diff --git a/README.md b/README.md index 056d2d9e43..85c0f751c4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# JKQtPlotter - A Qt Plotting Library +# JKQTPLotter - A Qt Plotting Library This is an extensive library of function/data plotter classes for Qt (>= 4.7, tested with Qt up to 5.11). This software is licensed under the term of the [GNU Lesser General Public License 2.1 (LGPL 2.1)](./LICENSE) or above. ## Main Features -- 2D Plotter class (JKQtPlotter) +- 2D Plotter class (JKQTPLotter) - 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 ...) @@ -33,16 +33,16 @@ This software is licensed under the term of the [GNU Lesser General Public Licen - extensive library of image plots (inclusing different color-scale modes, RGBA-plots, overlays/masks) - contour plots - geometric forms/annotations - - can be easily extended by deriving a new graph from JKQTPplotElement or JKQTPplotObject + - can be easily extended by deriving a new graph from JKQTPPlotElement or JKQTPPlotObject - optional: OpenCV interface - extensive set of [Examples/Tutorials](./examples/README.md) -- extensive doxygen-generated [Documentation](http://jkriege2.github.io/JKQtPlotter/index.html) +- extensive doxygen-generated [Documentation](http://jkriege2.github.io/JKQTPLotter/index.html) -## [Documentation](http://jkriege2.github.io/JKQtPlotter/index.html) +## [Documentation](http://jkriege2.github.io/JKQTPLotter/index.html) A Documentation (auto-)generated with [doxygen](http://www.doxygen.nl/) from the trunk source code can be found here: -**[http://jkriege2.github.io/JKQtPlotter/index.html](http://jkriege2.github.io/JKQtPlotter/index.html)** +**[http://jkriege2.github.io/JKQTPLotter/index.html](http://jkriege2.github.io/JKQTPLotter/index.html)** -Documentation is auto-generated after pushes by [Travis](https://travis-ci.org/jkriege2/JKQtPlotter): [![Build Status](https://travis-ci.org/jkriege2/JKQtPlotter.svg?branch=master)](https://travis-ci.org/jkriege2/JKQtPlotter) +Documentation is auto-generated after pushes by [Travis](https://travis-ci.org/jkriege2/JKQTPLotter): [![Build Status](https://travis-ci.org/jkriege2/JKQTPLotter.svg?branch=master)](https://travis-ci.org/jkriege2/JKQTPLotter) ## [Examples](./examples/) There is a [large set of usage examples (with explanations for each) and tutorials](./examples/) in the folder [`./examples/`](./examples). diff --git a/doc/Doxyfile b/doc/Doxyfile index e7ea6af744..6d40fb2cdd 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = JKQtPlotter +PROJECT_NAME = JKQTPLotter # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version @@ -158,7 +158,7 @@ INLINE_INHERITED_MEMB = NO # shortest path that makes the file name unique will be used # The default value is: YES. -FULL_PATH_NAMES = YES +FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand diff --git a/doc/dox/examples_and_tutorials.dox b/doc/dox/examples_and_tutorials.dox index 770493d175..0446dc48a4 100644 --- a/doc/dox/examples_and_tutorials.dox +++ b/doc/dox/examples_and_tutorials.dox @@ -12,53 +12,53 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
ScreenshotDescriptionNotes
\image html jkqtplotter_simpletest1_small.png - \subpage JKQTPlotterSimpleTest - `JKQTPxyLineGraph`
C++-style QVector arrays of data +
\subpage JKQTPLotterSimpleTest + `JKQTPXYLineGraph`
C++-style QVector arrays of data
\image html jkqtplotter_simpletest_speed_small.png - \subpage JKQtPlotterSpeedTest - `JKQTPxyLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed +
\subpage JKQTPLotterSpeedTest + `JKQTPXYLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed
\image html jkqtplotter_simpletest_symbols_and_styles_small.png - \subpage JKQtPlotterSymbolsAndStyles - `JKQTPxyLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring +
\subpage JKQTPLotterSymbolsAndStyles + `JKQTPXYLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring
\image html jkqtplotter_simpletest_stepplots_small.png - \subpage JKQtPlotterStepPlot - `JKQTPstepHorizontalGraph` (and `JKQTPxyLineGraph`)
C++ vector of data
different step modes, filled and line-only +
\subpage JKQTPLotterStepPlot + `JKQTPStepHorizontalGraph` (and `JKQTPXYLineGraph`)
C++ vector of data
different step modes, filled and line-only
\image html jkqtplotter_simpletest_symbols_and_errors_small.png - \subpage JKQtPlotterSymbolsErrors - `JKQTPxyLineErrorGraph`
C-style arrays of data +
\subpage JKQTPLotterSymbolsErrors + `JKQTPXYLineErrorGraph`
C-style arrays of data
\image html jkqtplotter_simpletest_errorbarstyles_small.png - \subpage JKQtPlotterErrorBarStyles - `JKQTPxyLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid +
\subpage JKQTPLotterErrorBarStyles + `JKQTPXYLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid
\image html jkqtplotter_simpletest_barchart_small.png - \subpage JKQtPlotterBarcharts - `JKQTPbarVerticalGraph`
C-style arrays of data -
\image html JKQTPbarHorizontalGraphStacked_small.png - \subpage JKQtPlotterStackedBarChart - `JKQTPbarVerticalStackableGraph`, `JKQTPbarHorizontalStackableGraph`
C++-style vectors of data +
\subpage JKQTPLotterBarcharts + `JKQTPBarVerticalGraph`
C-style arrays of data +
\image html JKQTPBarHorizontalGraphStacked_small.png + \subpage JKQTPLotterStackedBarChart + `JKQTPBarVerticalStackableGraph`, `JKQTPBarHorizontalStackableGraph`
C++-style vectors of data
\image html jkqtplotter_simpletest_filledgraphs_small.png - \subpage JKQtPlotterFilledGraphs - `JKQTPbarVerticalGraph`
setting/altering data in `JKQTPdatstore` directly
transparent plots
calculating histograms +
\subpage JKQTPLotterFilledGraphs + `JKQTPBarVerticalGraph`
setting/altering data in `JKQTPDatstore` directly
transparent plots
calculating histograms
\image html jkqtplotter_simpletest_impulsesplot_small.png - \subpage JKQtPlotterImpulsePlots - `JKQTPimpulsesVerticalGraph` and `JKQTPimpulsesHorizontalGraph`
C++-style QVector as plot data +
\subpage JKQTPLotterImpulsePlots + `JKQTPImpulsesVerticalGraph` and `JKQTPImpulsesHorizontalGraph`
C++-style QVector as plot data
\image html jkqtplotter_simpletest_paramscatterplot_small.png - \subpage JKQtPlotterParamScatter - `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data +
\subpage JKQTPLotterParamScatter + `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data
\image html jkqtplotter_simpletest_paramscatterplot_image_small.png - \subpage JKQtPlotterParamScatterImage - `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics +
\subpage JKQTPLotterParamScatterImage + `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics
\image html jkqtplotter_simpletest_parametriccurve_small.png - \subpage JKQtPlotterParametricCurves - `JKQTPxyLineGraph` and `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting +
\subpage JKQTPLotterParametricCurves + `JKQTPXYLineGraph` and `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting
\image html jkqtplotter_simpletest_functionplot_small.png - \subpage JKQtPlotterFunctionPlots - `JKQTPxFunctionLineGraph`
diretly plotting C/C++-functions +
\subpage JKQTPLotterFunctionPlots + `JKQTPXFunctionLineGraph`
diretly plotting C/C++-functions
\image html jkqtplotter_simpletest_parsedfunctionplot_small.png - \subpage JKQtPlotterParsedFunctionPlot - `JKQTPxParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator +
\subpage JKQTPLotterParsedFunctionPlot + `JKQTPXParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator
\image html jkqtplotter_simpletest_geometric_small.png - \subpage JKQtPlotterGeometricGraphs - `JKQTPplotObject`, `JKQTPgeoArc`, `JKQTPgeoLine`, `JKQTPgeoRectangle`, ... + \subpage JKQTPLotterGeometricGraphs + `JKQTPPlotObject`, `JKQTPGeoArc`, `JKQTPGeoLine`, `JKQTPGeoRectangle`, ...
@@ -67,11 +67,11 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
Screenshot Description Notes
\image html jkqtplotter_simpletest_logaxes_small.png - \subpage JKQtPlotterLogAxes - `JKQTPxyLineGraph` and `JKQTPgeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph +
\subpage JKQTPLotterLogAxes + `JKQTPXYLineGraph` and `JKQTPGeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph
\image html jkqtplotter_simpletest_dateaxes_timeaxis_small.png - \subpage JKQtPlotterDateTimeAxes - `JKQTPxyLineGraph` and `JKQTPfilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files +
\subpage JKQTPLotterDateTimeAxes + `JKQTPXYLineGraph` and `JKQTPFilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files
@@ -81,22 +81,22 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
Screenshot Description Notes
\image html jkqtplotter_simpletest_rgbimageplot_qt_small.png - \subpage JKQtPlotterImagePlotQImageRGB + \subpage JKQTPLotterImagePlotQImageRGB `JKQTPImage`
`QImage` drawn onto a plot with arbitrary scaling)
\image html jkqtplotter_simpletest_imageplot_small.png - \subpage JKQtPlotterImagePlot + \subpage JKQTPLotterImagePlot `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Describes several options of the image plotting classes (different ways of color coding, what to do with data above/below the limits etc.)
\image html jkqtplotter_simpletest_imageplot_modifier_small.png - \subpage JKQtPlotterImagePlotModifier + \subpage JKQTPLotterImagePlotModifier `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Image is modified by a second image to display two data dimensions at the same time
\image html jkqtplotter_simpletest_imageplot_nodatastore_small.png - \subpage JKQtPlotterImagePlotNoDatastore + \subpage JKQTPLotterImagePlotNoDatastore `JKQTPMathImage`
image data in a C-style row-major array, not using internal datastore
\image html jkqtplotter_simpletest_imageplot_opencv_small.png - \subpage JKQtPlotterImagePlotOpenCV + \subpage JKQTPLotterImagePlotOpenCV `JKQTPColumnMathImage`
image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore
\image html jkqtplotter_simpletest_rgbimageplot_opencv_small.png - \subpage JKQtPlotterImagePlotRGBOpenCV + \subpage JKQTPLotterImagePlotRGBOpenCV `JKQTPColumnRGBMathImage`
image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore
@@ -107,11 +107,11 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
Screenshot Description Notes
\image html test_multiplot_small.png - \subpage JKQtPlotterMultiPlotLayout + \subpage JKQTPLotterMultiPlotLayout Combining plots in Qt Layouts
linking plot axes
copy data from a `std::map` int the datastore
print plots/print preview
\image html jkqtplotter_simpletest_ui_small.png - \subpage JKQtPlotterQtCreator - using Qt Form Designer
parsed function plots (`JKQTPxParsedFunctionLineGraph`)
+ \subpage JKQTPLotterQtCreator + using Qt Form Designer
parsed function plots (`JKQTPXParsedFunctionLineGraph`) @@ -121,8 +121,8 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
Screenshot Description Notes
\image html jkqtmathtext_simpletest_small.png - \subpage JKQTmathTextSimpleExample - JKQTmathText
render LaTeX markup (Schrödinger's equation) +
\subpage JKQTMathTextSimpleExample + JKQTMathText
render LaTeX markup (Schrödinger's equation)
diff --git a/doc/dox/jkqtfastplotter.dox b/doc/dox/jkqtfastplotter.dox index 264bd1a7b6..582852c3b9 100644 --- a/doc/dox/jkqtfastplotter.dox +++ b/doc/dox/jkqtfastplotter.dox @@ -3,7 +3,7 @@ \defgroup jkqtfastplotter JKQTFastPlotter: Speed-Optimized Plotter class This is an indepent (and fully self-contained) plotter class, which is optimized for drawing speed, rather than - output quality. It lacks several of the advanced features of JKQtPlotter, but can be used in cases, where fast + output quality. It lacks several of the advanced features of JKQTPLotter, but can be used in cases, where fast update of plots or real-time plotting is required. An example for the usage of this class can be found here: \link ../../examples/jkqtfastplotter_test \endlink diff --git a/doc/dox/jkqtmathtext.dox b/doc/dox/jkqtmathtext.dox index 10d627f124..994f8baa73 100644 --- a/doc/dox/jkqtmathtext.dox +++ b/doc/dox/jkqtmathtext.dox @@ -1,15 +1,15 @@ /*! -\defgroup jkqtmathtext JKQTmathText LaTeX-Renderer for Qt +\defgroup jkqtmathtext JKQTMathText LaTeX-Renderer for Qt - This group contains JKQTmathText, a self-contained LaTeX-renderer for Qt. It is used to renderer - labels in JKQtPlotter, but can be used independently. The class does not depend on any library, + This group contains JKQTMathText, a self-contained LaTeX-renderer for Qt. It is used to renderer + labels in JKQTPLotter, but can be used independently. The class does not depend on any library, except Qt. In particular it actually parses a LaTeX string and draws it in pure C++. It does NOT rely on an installed LaTeX for the rendering! Examples for the usage of this class can be found here: - - \ref JKQTmathTextSimpleExample + - \ref JKQTMathTextSimpleExample . diff --git a/doc/dox/jkqtplotter.dox b/doc/dox/jkqtplotter.dox index 51ee25247e..d836ab1400 100644 --- a/doc/dox/jkqtplotter.dox +++ b/doc/dox/jkqtplotter.dox @@ -1,6 +1,6 @@ /*! -\defgroup jkqtptools Tool Functions and Definitions for JKQtPlotter +\defgroup jkqtptools Tool Functions and Definitions for JKQTPLotter This group contains a set of tools that I've written over the years to enhance the C++ standard library. @@ -27,9 +27,9 @@ C++ standard library. -\defgroup jkqtplotter JKQtPlotter: Qt based Scientific Plotter Class +\defgroup jkqtplotter JKQTPLotter: Qt based Scientific Plotter Class -A Qt based plotter for 2D scientific graphs. Main Plotting widget is JKQtPlotter. +A Qt based plotter for 2D scientific graphs. Main Plotting widget is JKQTPLotter. \defgroup jkqtpdatastorage Data Storage Classes/System @@ -44,11 +44,11 @@ classes. \defgroup jkqtpopencvinterface OpenCV Interfaceing Tools \ingroup jkqtpdatastorage -Classes and functions in this group allow JKQtPlotter to directly work with OpenCV data structures. +Classes and functions in this group allow JKQTPLotter to directly work with OpenCV data structures. Examples: - - \ref JKQtPlotterImagePlotOpenCV - - \ref JKQtPlotterImagePlotRGBOpenCV + - \ref JKQTPLotterImagePlotOpenCV + - \ref JKQTPLotterImagePlotRGBOpenCV . \defgroup jkqtpplotterclasses Plotter Class & Plotter Widget @@ -58,15 +58,15 @@ This group contains the actual plotter classes, that implement layout management coordinate system management an actual plotter widget ... There are two main classes: - - JKQtBasePlotter is a QObject-derived class that implements all the plotting logic and drawing code. It does not implement a Qt widget though. - - JKQtPlotter is a QWidget-based class that contains a JKQtBasePlotter and uses it to draw plots onto a Qt form. + - JKQTBasePlotter is a QObject-derived class that implements all the plotting logic and drawing code. It does not implement a Qt widget though. + - JKQTPLotter is a QWidget-based class that contains a JKQTBasePlotter and uses it to draw plots onto a Qt form. . \defgroup jkqtplotter_elements Plot Elements \ingroup jkqtplotter -This group assembles all classes that represent different elements of a plot (managed by JKQtBasePlotter/JKQtPlotter). +This group assembles all classes that represent different elements of a plot (managed by JKQTBasePlotter/JKQTPLotter). There are these major subgroups: - \ref jkqtpbaseplotter_elements contains all non-graph objects, i.e. things like coordinate axes and so on - \ref jkqtplotter_graphsgroup contains the actual graph classes @@ -77,7 +77,7 @@ 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 @@ -109,7 +109,7 @@ These classes are used by JKQtPlotterBase to output the plot \ingroup jkqtplotter_graphsgroup Examples: - - \ref JKQtPlotterGeometricGraphs + - \ref JKQTPLotterGeometricGraphs . \defgroup jkqtplotter_diverse Diverse Other Graphs (Ranges, ...) @@ -133,17 +133,17 @@ Examples: -\defgroup jkqtpqtwidgetsttools Qt Widgets/Tools to work with JKQtPlotter +\defgroup jkqtpqtwidgetsttools Qt Widgets/Tools to work with JKQTPLotter \ingroup jkqtplotter -This group assembles several Qt widgets and tool classes that are linked to JKQtPlotter/JKQtBasePlotter and allow to build advanced GUIs for these (e.g. model/view access to internal data ...) +This group assembles several Qt widgets and tool classes that are linked to JKQTPLotter/JKQTBasePlotter and allow to build advanced GUIs for these (e.g. model/view access to internal data ...) -\defgroup jkqtpgraphsmodel Qt Data Models to Access Graphs in a JKQtBasePlotter/JKQtPlotter +\defgroup jkqtpgraphsmodel Qt Data Models to Access Graphs in a JKQTBasePlotter/JKQTPLotter \ingroup jkqtpqtwidgetsttools -Data models in this group allow to access different internal data from a JKQtBasePlotter/JKQtPlotter and in part to manipulate these. +Data models in this group allow to access different internal data from a JKQTBasePlotter/JKQTPLotter and in part to manipulate these. -\defgroup jkqtpcomboboxes Comboboxes for Properties of JKQtBasePlotter/JKQtPlotter +\defgroup jkqtpcomboboxes Comboboxes for Properties of JKQTBasePlotter/JKQTPLotter \ingroup jkqtpqtwidgetsttools This group contains several QComboBox-derived classes that can be used to select different enum-values (e.g. with JKQTPMathImageColorPaletteComboBox you can select a color-palette from JKQTPMathImageColorPalette ). diff --git a/doc/dox/mainpage.dox b/doc/dox/mainpage.dox index d6e4b3217a..46dfe1ca01 100644 --- a/doc/dox/mainpage.dox +++ b/doc/dox/mainpage.dox @@ -1,6 +1,6 @@ /*! -\mainpage JKQtPlotter - A Qt Plotting Library +\mainpage JKQTPLotter - A Qt Plotting Library This is an extensive library of function/data plotter classes for Qt (>= 4.7, tested with Qt up to 5.11). This software is licensed under the term of the GNU Lesser General Public License 2.1 @@ -9,11 +9,11 @@ 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 ... + - 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 - highly customizable look and feel @@ -37,20 +37,20 @@ This software is licensed under the term of the GNU Lesser General Public Licens - extensive library of image plots (inclusing different color-scale modes, RGBA-plots, overlays/masks) - contour plots - geometric forms/annotations, see: \ref jkqtplotter_geoplots - - can be easily extended by deriving a new graph from JKQTPplotElement or JKQTPplotObject + - can be easily extended by deriving a new graph from JKQTPPlotElement or JKQTPPlotObject - optional: OpenCV interface, see: \ref jkqtpopencvinterface -- integrated LaTeX parser/renderer JKQTmathText: +- integrated LaTeX parser/renderer JKQTMathText: - pure C++ - no dependencies in particular no installed LaTeX required - - can be used independently of JKQtPlotter + - can be used independently of JKQTPLotter - see: \ref jkqtmathtext -- a second plotter widget JKQtFastPlotter: - - is optimized for fast plotting, but is not as feature-rich as JKQtPlotter - - may be used independently of JKQtPlotter +- a second 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 -- 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) +- 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) \image html screenshotsbanner.png diff --git a/examples/README.md b/examples/README.md index ec4ceec207..e118d28c38 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,4 @@ -# Example (JKQtPlotter): Examples & Tutorials {#exampleProjectsTutorials} +# Example (JKQTPLotter): Examples & Tutorials {#exampleProjectsTutorials} This section assembles some simple examples of usage. You can find more (complex) examples for the classes in this repository in the subfolder "test". All test-projects are Qt-projects that use qmake to build. You can load them into QtCreator easily. @@ -7,29 +7,29 @@ All test-projects are Qt-projects that use qmake to build. You can load them int | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](../screenshots/jkqtplotter_simpletest1_small.png)](./simpletest/README.md) | [Very Basic Example (Line Graph)](./simpletest/README.md) | `JKQTPxyLineGraph`
C++-style QVector arrays of data | -| [![](../screenshots/jkqtplotter_simpletest_speed_small.png)](./simpletest_speed) | [Line Graph with Live Data / Speed Test](./simpletest_speed) | `JKQTPxyLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed | -| [![](../screenshots/jkqtplotter_simpletest_symbols_and_styles_small.png)](./simpletest_symbols_and_styles) | [Line Graph with Different Symbols and Line Styles](./simpletest_symbols_and_styles) | `JKQTPxyLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring | -| [![](../screenshots/jkqtplotter_simpletest_stepplots_small.png)](./simpletest_stepplots) | [Step Line Plots in Different Styles](./simpletest_stepplots) | `JKQTPstepHorizontalGraph` (and `JKQTPxyLineGraph`)
C++ vector of data
different step modes, filled and line-only | -| [![](../screenshots/jkqtplotter_simpletest_symbols_and_errors_small.png)](./simpletest_symbols_and_errors) | [Simple Line/Symbol Graph With Errorbars](./simpletest_symbols_and_errors) | `JKQTPxyLineErrorGraph`
C-style arrays of data | -| [![](../screenshots/jkqtplotter_simpletest_errorbarstyles_small.png)](./simpletest_errorbarstyles) | [Different Types of Error Indicators](./simpletest_errorbarstyles) | `JKQTPxyLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid | -| [![](../screenshots/jkqtplotter_simpletest_barchart_small.png)](./simpletest_barchart) | [Simple Bar Charts](./simpletest_barchart) | `JKQTPbarVerticalGraph`
C-style arrays of data | -| [![](../screenshots/JKQTPbarVerticalGraphStacked_small.png)
![](../screenshots/JKQTPbarHorizontalGraphStacked_small.png)](./simpletest_stackedbars) | [Stacked Bar Charts](./simpletest_stackedbars) | `JKQTPbarVerticalStackableGraph`, `JKQTPbarHorizontalStackableGraph`
C++-style vectors of data | -| [![](../screenshots/jkqtplotter_simpletest_filledgraphs_small.png)](./simpletest_filledgraphs) | [Filled Curve Plots](./simpletest_filledgraphs) | `JKQTPbarVerticalGraph`
setting/altering data in `JKQTPdatstore` directly
transparent plots
calculating histograms | -| [![](../screenshots/jkqtplotter_simpletest_impulsesplot_small.png)](./simpletest_impulsesplot) | [Impulse Plots](./simpletest_impulsesplot) | `JKQTPimpulsesVerticalGraph` and `JKQTPimpulsesHorizontalGraph`
C++-style QVector as plot data | -| [![](../screenshots/jkqtplotter_simpletest_paramscatterplot_small.png)](./simpletest_paramscatterplot) | [Scatter Graph with Parametrized Symbols/Colors](./simpletest_paramscatterplot) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data | -| [![](../screenshots/jkqtplotter_simpletest_paramscatterplot_image_small.png)](./simpletest_paramscatterplot_image) | [Draw an Artistic Image with a Parametrized Scatter Graph](./simpletest_paramscatterplot_image) | `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics | -| [![](../screenshots/jkqtplotter_simpletest_parametriccurve_small.png)](./simpletest_parametriccurve) | [Plotting Parametric Curves](./simpletest_parametriccurve) | `JKQTPxyLineGraph` and `JKQTPxyParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting | -| [![](../screenshots/jkqtplotter_simpletest_functionplot_small.png)](./simpletest_functionplot) | [Plotting Mathematical Functions as Line Graphs](./simpletest_functionplot) | `JKQTPxFunctionLineGraph`
diretly plotting C/C++-functions | -| [![](../screenshots/jkqtplotter_simpletest_parsedfunctionplot_small.png)](./simpletest_parsedfunctionplot) | [Plotting Parsed Mathematical Functions as Line Graphs](./simpletest_parsedfunctionplot) | `JKQTPxParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator | +| [![](../screenshots/jkqtplotter_simpletest1_small.png)](./simpletest/README.md) | [Very Basic Example (Line Graph)](./simpletest/README.md) | `JKQTPXYLineGraph`
C++-style QVector arrays of data | +| [![](../screenshots/jkqtplotter_simpletest_speed_small.png)](./simpletest_speed) | [Line Graph with Live Data / Speed Test](./simpletest_speed) | `JKQTPXYLineGraph`
external `std::array` data, not owned by datastore
live-data, measure plotting speed
tipps to increas plotting speed | +| [![](../screenshots/jkqtplotter_simpletest_symbols_and_styles_small.png)](./simpletest_symbols_and_styles) | [Line Graph with Different Symbols and Line Styles](./simpletest_symbols_and_styles) | `JKQTPXYLineGraph`
C++ vector of data
setting line styles and symbol styles
automatic graph coloring | +| [![](../screenshots/jkqtplotter_simpletest_stepplots_small.png)](./simpletest_stepplots) | [Step Line Plots in Different Styles](./simpletest_stepplots) | `JKQTPStepHorizontalGraph` (and `JKQTPXYLineGraph`)
C++ vector of data
different step modes, filled and line-only | +| [![](../screenshots/jkqtplotter_simpletest_symbols_and_errors_small.png)](./simpletest_symbols_and_errors) | [Simple Line/Symbol Graph With Errorbars](./simpletest_symbols_and_errors) | `JKQTPXYLineErrorGraph`
C-style arrays of data | +| [![](../screenshots/jkqtplotter_simpletest_errorbarstyles_small.png)](./simpletest_errorbarstyles) | [Different Types of Error Indicators](./simpletest_errorbarstyles) | `JKQTPXYLineErrorGraph`
different styles of error indicators for x- and y-errors
C++-style QVector for data
styling error indicators
moving key and formatting plotter grid | +| [![](../screenshots/jkqtplotter_simpletest_barchart_small.png)](./simpletest_barchart) | [Simple Bar Charts](./simpletest_barchart) | `JKQTPBarVerticalGraph`
C-style arrays of data | +| [![](../screenshots/JKQTPBarVerticalGraphStacked_small.png)
![](../screenshots/JKQTPBarHorizontalGraphStacked_small.png)](./simpletest_stackedbars) | [Stacked Bar Charts](./simpletest_stackedbars) | `JKQTPBarVerticalStackableGraph`, `JKQTPBarHorizontalStackableGraph`
C++-style vectors of data | +| [![](../screenshots/jkqtplotter_simpletest_filledgraphs_small.png)](./simpletest_filledgraphs) | [Filled Curve Plots](./simpletest_filledgraphs) | `JKQTPBarVerticalGraph`
setting/altering data in `JKQTPDatstore` directly
transparent plots
calculating histograms | +| [![](../screenshots/jkqtplotter_simpletest_impulsesplot_small.png)](./simpletest_impulsesplot) | [Impulse Plots](./simpletest_impulsesplot) | `JKQTPImpulsesVerticalGraph` and `JKQTPImpulsesHorizontalGraph`
C++-style QVector as plot data | +| [![](../screenshots/jkqtplotter_simpletest_paramscatterplot_small.png)](./simpletest_paramscatterplot) | [Scatter Graph with Parametrized Symbols/Colors](./simpletest_paramscatterplot) | `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
modify scatter/points/line-graph properties by data | +| [![](../screenshots/jkqtplotter_simpletest_paramscatterplot_image_small.png)](./simpletest_paramscatterplot_image) | [Draw an Artistic Image with a Parametrized Scatter Graph](./simpletest_paramscatterplot_image) | `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
rectangular arrangement of scatters
generative computer graphics | +| [![](../screenshots/jkqtplotter_simpletest_parametriccurve_small.png)](./simpletest_parametriccurve) | [Plotting Parametric Curves](./simpletest_parametriccurve) | `JKQTPXYLineGraph` and `JKQTPXYParametrizedScatterGraph`
C++-style QVector as plot data
parametric curve plotting | +| [![](../screenshots/jkqtplotter_simpletest_functionplot_small.png)](./simpletest_functionplot) | [Plotting Mathematical Functions as Line Graphs](./simpletest_functionplot) | `JKQTPXFunctionLineGraph`
diretly plotting C/C++-functions | +| [![](../screenshots/jkqtplotter_simpletest_parsedfunctionplot_small.png)](./simpletest_parsedfunctionplot) | [Plotting Parsed Mathematical Functions as Line Graphs](./simpletest_parsedfunctionplot) | `JKQTPXParsedFunctionLineGraph`
plotting functions with the internal math equation parser/evaluator | | [![](../screenshots/jkqtplotter_simpletest_geometric_small.png)](./simpletest_geometric) | [Plotting Geometric Objects](./simpletest_geometric) | | ## Styling the Plot, Keys, Axes, ... | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](../screenshots/jkqtplotter_simpletest_logaxes_small.png)](./simpletest_logaxes) | [logarithmic axes](./simpletest_logaxes) | `JKQTPxyLineGraph` and `JKQTPgeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph | -| [![](../screenshots/jkqtplotter_simpletest_dateaxes_small.png)
![](../screenshots/jkqtplotter_simpletest_dateaxes_dates_small.png)
![](../screenshots/jkqtplotter_simpletest_dateaxes_timeaxis_small.png)](./simpletest_dateaxes) | [date/time axes](./simpletest_dateaxes) | `JKQTPxyLineGraph` and `JKQTPfilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files | +| [![](../screenshots/jkqtplotter_simpletest_logaxes_small.png)](./simpletest_logaxes) | [logarithmic axes](./simpletest_logaxes) | `JKQTPXYLineGraph` and `JKQTPGeoText`
C++ vector of data
logarithmic axes and styling
plot line styles
internal LaTeX parser
add commenting text to a graph | +| [![](../screenshots/jkqtplotter_simpletest_dateaxes_small.png)
![](../screenshots/jkqtplotter_simpletest_dateaxes_dates_small.png)
![](../screenshots/jkqtplotter_simpletest_dateaxes_timeaxis_small.png)](./simpletest_dateaxes) | [date/time axes](./simpletest_dateaxes) | `JKQTPXYLineGraph` and `JKQTPFilledVerticalRangeGraph`
C++ vector of data
date/time axes
plot min/max range graph
internal LaTeX parser
data from CSV files | ## Image data Plots @@ -48,12 +48,12 @@ All test-projects are Qt-projects that use qmake to build. You can load them int | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | | [![](../screenshots/test_multiplot_small.png)](./test_multiplot) | [Layouting Several Plots](./test_multiplot) | Combining plots in Qt Layouts
linking plot axes
copy data from a `std::map` int the datastore
print plots/print preview | -| [![](../screenshots/jkqtplotter_simpletest_ui_small.png)](./simpletest_ui) | [Placing JKQtPlotter into a Qt User-Interface-XML-file (`*.ui`)](./simpletest_ui) | using Qt Form Designer
parsed function plots (`JKQTPxParsedFunctionLineGraph`) | +| [![](../screenshots/jkqtplotter_simpletest_ui_small.png)](./simpletest_ui) | [Placing JKQTPLotter into a Qt User-Interface-XML-file (`*.ui`)](./simpletest_ui) | using Qt Form Designer
parsed function plots (`JKQTPXParsedFunctionLineGraph`) | ## Tools and Special Features | Screenshot | Description | Notes | |:-------------:| ------------- | ------------- | -| [![](../screenshots/jkqtmathtext_simpletest_small.png)](./jkqtmathtext_simpletest) | [JKQTmathText: LaTeX Renderer](./jkqtmathtext_simpletest) | | +| [![](../screenshots/jkqtmathtext_simpletest_small.png)](./jkqtmathtext_simpletest) | [JKQTMathText: LaTeX Renderer](./jkqtmathtext_simpletest) | | diff --git a/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro b/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro index a86a62b54a..a77e85fa9f 100644 --- a/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro +++ b/examples/jkqtfastplotter_test/jkqtfastplotter_test.pro @@ -28,7 +28,7 @@ DEFINES += DEBUG_TIMING greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport -# include JKQtPlotter library +# include JKQTPLotter library DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp b/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp index 176948980e..7559035a25 100644 --- a/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp +++ b/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp @@ -1,5 +1,5 @@ /** \example jkqtfastplotter_test_testmain.cpp - * Example of how to use JKQtFastPlotter + * Example of how to use JKQTFastPlotter */ #include "jkqtfastplotter_test_testmain.h" diff --git a/examples/jkqtmathtext_simpletest/README.md b/examples/jkqtmathtext_simpletest/README.md index dac855245c..9b7f272e56 100644 --- a/examples/jkqtmathtext_simpletest/README.md +++ b/examples/jkqtmathtext_simpletest/README.md @@ -1,10 +1,10 @@ -# Example (JKQTmathText): A simple usage example {#JKQTmathTextSimpleExample} -JKQTmathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter. +# Example (JKQTMathText): A simple usage example {#JKQTMathTextSimpleExample} +JKQTMathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter. This project (see `./examples/jkqtmathtext_simpletest/`) simply creates a QLabel (as a new window) that displays a rendered LaTeX equation (here the time-dependent Schrödinger equation). The QMake project looks like this (see [`jkqtmathtext_simpletest.pro`](../jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro): ```.qmake -# include JKQTmathText source-code, including the open-source XITS fonts +# include JKQTMathText source-code, including the open-source XITS fonts include(../../lib/jkqtmathtext_with_xits.pri) SOURCES += jkqtmathtext_simpletest.cpp @@ -37,10 +37,10 @@ int main(int argc, char* argv[]) pix.fill(QColor("white")); QPainter painter; - // 2. now we create a JKQTmathText object. - // Also we configure the JKQTmathText to use the XITS fonts that + // 2. now we create a JKQTMathText object. + // Also we configure the JKQTMathText to use the XITS fonts that // were included in the *.pro-file - JKQTmathText mathText; + JKQTMathText mathText; mathText.useXITS(); mathText.set_fontSize(20); diff --git a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp index 7d47d7ea3b..3d8fb78de8 100644 --- a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp @@ -1,7 +1,7 @@ /** \example jkqtmathtext_simpletest.cpp - * A very basic example for the usage of JKQTmathText + * A very basic example for the usage of JKQTMathText * - * \ref JKQTmathTextSimpleExample + * \ref JKQTMathTextSimpleExample */ #include @@ -21,10 +21,10 @@ int main(int argc, char* argv[]) pix.fill(QColor("white")); QPainter painter; - // 2. now we create a JKQTmathText object. - // Also we configure the JKQTmathText to use the XITS fonts that + // 2. now we create a JKQTMathText object. + // Also we configure the JKQTMathText to use the XITS fonts that // were included in the *.pro-file - JKQTmathText mathText; + JKQTMathText mathText; mathText.useXITS(); mathText.set_fontSize(20); diff --git a/examples/jkqtmathtext_test/asana.qrc b/examples/jkqtmathtext_test/asana.qrc index b0d54c52a4..6cf0183b28 100644 --- a/examples/jkqtmathtext_test/asana.qrc +++ b/examples/jkqtmathtext_test/asana.qrc @@ -1,5 +1,5 @@ - + asana/Asana-Math.otf diff --git a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp index b735b15edd..17a9c59fa9 100644 --- a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp +++ b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp @@ -20,7 +20,7 @@ HighResTimer ht; -double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name) { +double draw(QPainter& painter, double X, double YY, JKQTMathText& mt, QString name) { double Y=YY; painter.save(); ht.start(); @@ -67,7 +67,7 @@ void timingTest(QPainter& painter, QString text, QString name, double fontSize) std::cout<<"testing '"<(node); - JKQTmathText::MTwhitespaceNode* spN=dynamic_cast(node); - JKQTmathText::MTsymbolNode* symN=dynamic_cast(node); - JKQTmathText::MTlistNode* lstN=dynamic_cast(node); - JKQTmathText::MTinstruction1Node* inst1N=dynamic_cast(node); - JKQTmathText::MTsubscriptNode* subN=dynamic_cast(node); - JKQTmathText::MTsuperscriptNode* superN=dynamic_cast(node); - JKQTmathText::MTbraceNode* braceN=dynamic_cast(node); - JKQTmathText::MTsqrtNode* sqrtN=dynamic_cast(node); - JKQTmathText::MTfracNode* fracN=dynamic_cast(node); - JKQTmathText::MTmatrixNode* matrixN=dynamic_cast(node); - JKQTmathText::MTdecoratedNode* decoN=dynamic_cast(node); + JKQTMathText::MTtextNode* txtN=dynamic_cast(node); + JKQTMathText::MTwhitespaceNode* spN=dynamic_cast(node); + JKQTMathText::MTsymbolNode* symN=dynamic_cast(node); + JKQTMathText::MTlistNode* lstN=dynamic_cast(node); + JKQTMathText::MTinstruction1Node* inst1N=dynamic_cast(node); + JKQTMathText::MTsubscriptNode* subN=dynamic_cast(node); + JKQTMathText::MTsuperscriptNode* superN=dynamic_cast(node); + JKQTMathText::MTbraceNode* braceN=dynamic_cast(node); + JKQTMathText::MTsqrtNode* sqrtN=dynamic_cast(node); + JKQTMathText::MTfracNode* fracN=dynamic_cast(node); + JKQTMathText::MTmatrixNode* matrixN=dynamic_cast(node); + JKQTMathText::MTdecoratedNode* decoN=dynamic_cast(node); QTreeWidgetItem* ti=nullptr; if (parent) ti=new QTreeWidgetItem(parent); else ti=new QTreeWidgetItem(ui->tree); if (decoN) { - name=QString("MTdecoratedNode: mode='%1'").arg(JKQTmathText::decorationToString(decoN->get_decoration())); + name=QString("MTdecoratedNode: mode='%1'").arg(JKQTMathText::decorationToString(decoN->get_decoration())); if (decoN->get_child()) ti->addChild(createTree(decoN->get_child(), ti)); } else if (matrixN) { int l=matrixN->get_lines(); int c=matrixN->get_columns(); name=QString("MTmatrixNode: l*c=%1*%2").arg(l).arg(c); - QVector > children=matrixN->get_children(); + QVector > children=matrixN->get_children(); for (int y=0; yget_mode())); + name=QString("MTfracNode: mode='%1'").arg(JKQTMathText::fracModeToString(fracN->get_mode())); if (fracN->get_child1()) ti->addChild(createTree(fracN->get_child1(), ti)); if (fracN->get_child2()) ti->addChild(createTree(fracN->get_child2(), ti)); } else if (sqrtN) { @@ -248,7 +248,7 @@ QTreeWidgetItem *TestForm::createTree(JKQTmathText::MTnode *node, QTreeWidgetIte if (inst1N->get_child()) ti->addChild(createTree(inst1N->get_child(), ti)); } else if (lstN) { name=QString("MTlistNode"); - QList list=lstN->get_nodes(); + QList list=lstN->get_nodes(); for (int i=0; iaddChild(createTree(list[i], ti)); } @@ -308,7 +308,7 @@ void TestForm::updateMath() QPixmap pix(W, H); pix.fill(); QPainter painter; - JKQTmathText mt(this); + JKQTMathText mt(this); double Y=Y1; diff --git a/examples/jkqtmathtext_test/testform.h b/examples/jkqtmathtext_test/testform.h index 9e8f97bfee..1e671a9bb3 100644 --- a/examples/jkqtmathtext_test/testform.h +++ b/examples/jkqtmathtext_test/testform.h @@ -26,9 +26,9 @@ class TestForm : public QWidget private: Ui::TestForm *ui; JKQTPHighResTimer ht; - double draw(QPainter& painter, double X, double YY, JKQTmathText& mt, QString name, double &durationSizingMS, double &durationTimingMS); + double draw(QPainter& painter, double X, double YY, JKQTMathText& mt, QString name, double &durationSizingMS, double &durationTimingMS); - QTreeWidgetItem* createTree(JKQTmathText::MTnode* node, QTreeWidgetItem *parent=NULL); + QTreeWidgetItem* createTree(JKQTMathText::MTnode* node, QTreeWidgetItem *parent=NULL); }; #endif // TESTFORM_H diff --git a/examples/jkqtmathtext_test/testform.ui b/examples/jkqtmathtext_test/testform.ui index 0568edfc76..dfc55d2a8f 100644 --- a/examples/jkqtmathtext_test/testform.ui +++ b/examples/jkqtmathtext_test/testform.ui @@ -193,7 +193,7 @@ - + left(left[sqrt{2picdotint_{-infty}^infty f(x);mathrm{d}x}right]right) @@ -418,7 +418,7 @@ - JKQTmathTextLabel + JKQTMathTextLabel QLabel
jkqtmathtext/jkqtmathtext.h
diff --git a/examples/jkqtplot_test/TestWidgetBarcharts.cpp b/examples/jkqtplot_test/TestWidgetBarcharts.cpp index acc5f22803..c19656d538 100644 --- a/examples/jkqtplot_test/TestWidgetBarcharts.cpp +++ b/examples/jkqtplot_test/TestWidgetBarcharts.cpp @@ -17,7 +17,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : QVBoxLayout* barchartLayout=new QVBoxLayout(this); setLayout(barchartLayout); resize(1000, 800); - plotBarchart=new JKQtPlotter(true, this); + plotBarchart=new JKQTPLotter(true, this); plotBarchart->set_doDrawing(false); plotBarchart->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); plotBarchart->setObjectName("plotBarchart"); @@ -47,7 +47,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : size_t bcpy2=plotBarchart->getDatastore()->addCopiedColumn(dataBCY2, "y2"); size_t bcpye2=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE2, "ye2"); - JKQTPbarVerticalErrorGraph* plteBar1=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); + JKQTPBarVerticalErrorGraph* plteBar1=new JKQTPBarVerticalErrorGraph(plotBarchart->get_plotter()); plteBar1->set_title(tr("bars 1")); plteBar1->set_xColumn(bcpxd); plteBar1->set_yColumn(bcpy1); @@ -56,7 +56,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : plteBar1->set_shift(-0.25); plotBarchart->get_plotter()->addGraph(plteBar1); - JKQTPbarVerticalErrorGraph* plteBar2=new JKQTPbarVerticalErrorGraph(plotBarchart->get_plotter()); + JKQTPBarVerticalErrorGraph* plteBar2=new JKQTPBarVerticalErrorGraph(plotBarchart->get_plotter()); plteBar2->set_xColumn(bcpxd); plteBar2->set_yColumn(bcpy2); plteBar2->set_yErrorColumn(bcpye2); @@ -74,7 +74,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : - plotBarchart2=new JKQtPlotter(false, this, plotBarchart->getDatastore()); + plotBarchart2=new JKQTPLotter(false, this, plotBarchart->getDatastore()); plotBarchart2->set_doDrawing(false); plotBarchart2->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); plotBarchart2->setObjectName("plotBarchart2"); @@ -82,7 +82,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : barchartLayout->addWidget(plotBarchart2); - JKQTPbarHorizontalErrorGraph* plteBar3=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); + JKQTPBarHorizontalErrorGraph* plteBar3=new JKQTPBarHorizontalErrorGraph(plotBarchart2->get_plotter()); plteBar3->set_title(tr("bars 1")); plteBar3->set_yColumn(bcpx); plteBar3->set_xColumn(bcpy1); @@ -91,7 +91,7 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : plteBar3->set_shift(-0.25); plotBarchart2->get_plotter()->addGraph(plteBar3); - JKQTPbarHorizontalErrorGraph* plteBar4=new JKQTPbarHorizontalErrorGraph(plotBarchart2->get_plotter()); + JKQTPBarHorizontalErrorGraph* plteBar4=new JKQTPBarHorizontalErrorGraph(plotBarchart2->get_plotter()); plteBar4->set_yColumn(bcpx); plteBar4->set_xColumn(bcpy2); plteBar4->set_xErrorColumn(bcpye2); diff --git a/examples/jkqtplot_test/TestWidgetBarcharts.h b/examples/jkqtplot_test/TestWidgetBarcharts.h index d2b7fec2df..83988ea4ed 100644 --- a/examples/jkqtplot_test/TestWidgetBarcharts.h +++ b/examples/jkqtplot_test/TestWidgetBarcharts.h @@ -44,8 +44,8 @@ class TestWidgetBarcharts : public QWidget protected: - JKQtPlotter* plotBarchart; - JKQtPlotter* plotBarchart2; + JKQTPLotter* plotBarchart; + JKQTPLotter* plotBarchart2; QCheckBox* chkBarLog; QSpinBox* spinBarLabelAngel; QSpinBox* spinBarLabelAngel2; diff --git a/examples/jkqtplot_test/TestWidgetContourPlots.cpp b/examples/jkqtplot_test/TestWidgetContourPlots.cpp index 1bed3f0f99..c5ee2fa34d 100644 --- a/examples/jkqtplot_test/TestWidgetContourPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetContourPlots.cpp @@ -16,14 +16,14 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : // contour plot QHBoxLayout* layoutContour=new QHBoxLayout(this); setLayout(layoutContour); - JKQtPlotter* plotContour=new JKQtPlotter(true, this); + JKQTPLotter* plotContour=new JKQTPLotter(true, this); plotContour->set_doDrawing(false); plotContour->get_plotter()->set_plotLabel(tr("\\textbf{hist contour plot}")); plotContour->setObjectName("contour"); plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "contour/"); layoutContour->addWidget(plotContour); - JKQtPlotter* plotDensity=new JKQtPlotter(true, this); + JKQTPLotter* plotDensity=new JKQTPLotter(true, this); plotContour->set_doDrawing(false); plotContour->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram plot with contours}")); plotDensity->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram}")); diff --git a/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp index ab427f78ee..bd3e62f9b9 100644 --- a/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp +++ b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp @@ -14,8 +14,8 @@ TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) : #define NEMPTY 500 - JKQtPlotter* plotEmpty=new JKQtPlotter(true, this); - JKQTPxyLineGraph* efunc=new JKQTPxyLineGraph(plotEmpty->get_plotter()); + JKQTPLotter* plotEmpty=new JKQTPLotter(true, this); + JKQTPXYLineGraph* efunc=new JKQTPXYLineGraph(plotEmpty->get_plotter()); double xef[NEMPTY], efy[NEMPTY]; for (int i=0; iaddWidget(plotFuncPlt); - pfunc=new JKQTPxParsedFunctionLineGraph(plotFuncPlt->get_plotter()); + pfunc=new JKQTPXParsedFunctionLineGraph(plotFuncPlt->get_plotter()); pfunc->set_function("x^2/10+sin(x*pi*10)"); pfunc->set_errorFunction("x^2/20"); pfunc->set_drawErrorPolygons(true); @@ -26,7 +26,7 @@ TestWidgetFunctionPlots::TestWidgetFunctionPlots(QWidget *parent) : plotFuncPlt->addGraph(pfunc); plotFuncPlt->update_plot(); - pfuncErrorStyle=new JKQTPerrorPlotstyleComboBox(this); + pfuncErrorStyle=new JKQTPErrorPlotstyleComboBox(this); pfuncErrorStyle->setCurrentIndex(3); plotFuncLayout->addWidget(pfuncErrorStyle); connect(pfuncErrorStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(setPFuncStyle())); @@ -84,8 +84,8 @@ void TestWidgetFunctionPlots::setPFuncStyle() { pfunc->set_drawErrorLines(false); pfunc->set_drawErrorPolygons(false); - if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorLines) pfunc->set_drawErrorLines(true); - if (pfuncErrorStyle->getErrorStyle()==JKQTPerrorPolygons) pfunc->set_drawErrorPolygons(true); + if (pfuncErrorStyle->getErrorStyle()==JKQTPErrorLines) pfunc->set_drawErrorLines(true); + if (pfuncErrorStyle->getErrorStyle()==JKQTPErrorPolygons) pfunc->set_drawErrorPolygons(true); pfunc->set_drawLine(chkPFuncDrawLine->isChecked()); pfunc->set_displaySamplePoints(chkPFuncDrawSamples->isChecked()); plotFuncPlt->update_plot(); diff --git a/examples/jkqtplot_test/TestWidgetFunctionPlots.h b/examples/jkqtplot_test/TestWidgetFunctionPlots.h index 99129b7df2..62a21d9d66 100644 --- a/examples/jkqtplot_test/TestWidgetFunctionPlots.h +++ b/examples/jkqtplot_test/TestWidgetFunctionPlots.h @@ -46,9 +46,9 @@ class TestWidgetFunctionPlots : public QWidget protected: - JKQTPxParsedFunctionLineGraph* pfunc; - JKQtPlotter* plotFuncPlt; - JKQTPerrorPlotstyleComboBox* pfuncErrorStyle; + JKQTPXParsedFunctionLineGraph* pfunc; + JKQTPLotter* plotFuncPlt; + JKQTPErrorPlotstyleComboBox* pfuncErrorStyle; QCheckBox* chkPFuncDrawSamples; QCheckBox* chkPFuncDrawLine; diff --git a/examples/jkqtplot_test/TestWidgetGeometry.cpp b/examples/jkqtplot_test/TestWidgetGeometry.cpp index c52a7844bc..962908d5a0 100644 --- a/examples/jkqtplot_test/TestWidgetGeometry.cpp +++ b/examples/jkqtplot_test/TestWidgetGeometry.cpp @@ -15,7 +15,7 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : QVBoxLayout* layout1=new QVBoxLayout(this); setLayout(layout1); resize(1000, 800); - JKQtPlotter* plotGeo=new JKQtPlotter(true, this); + JKQTPLotter* plotGeo=new JKQTPLotter(true, this); plotGeo->set_doDrawing(false); plotGeo->setObjectName("plotGeo"); layout1->addWidget(plotGeo); @@ -30,21 +30,21 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : plotGeo->get_plotter()->set_axisAspectRatio(1); -// JKQTPgeoLine* line1=new JKQTPgeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); +// JKQTPGeoLine* line1=new JKQTPGeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); //plotGeo->get_plotter()->addGraph(line1); -// JKQTPgeoLine* line2=new JKQTPgeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); +// JKQTPGeoLine* line2=new JKQTPGeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); //plotGeo->get_plotter()->addGraph(line2); - JKQTPgeoRectangle* rect1=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); + JKQTPGeoRectangle* rect1=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); rect1->set_angle(30); //plotGeo->get_plotter()->addGraph(rect1); - JKQTPgeoRectangle* rect2=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("red"),2); + JKQTPGeoRectangle* rect2=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("red"),2); rect2->set_angle(45); //plotGeo->get_plotter()->addGraph(rect2); - JKQTPgeoRectangle* rect3=new JKQTPgeoRectangle(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2); + JKQTPGeoRectangle* rect3=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2); rect3->set_angle(-30); //plotGeo->get_plotter()->addGraph(rect3); - JKQTPgeoEllipse* ell3=new JKQTPgeoEllipse(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); + JKQTPGeoEllipse* ell3=new JKQTPGeoEllipse(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); ell3->set_angle(-30); //plotGeo->get_plotter()->addGraph(ell3); @@ -55,31 +55,31 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : p.append(QPointF(0,-2)); p.append(QPointF(M_PI,5.5)); -// JKQTPgeoPolygon* poly=new JKQTPgeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); +// JKQTPGeoPolygon* poly=new JKQTPGeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); //plotGeo->get_plotter()->addGraph(poly); -// JKQTPgeoPolyLines* lines=new JKQTPgeoPolyLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); +// JKQTPGeoPolyLines* lines=new JKQTPGeoPolyLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); //plotGeo->get_plotter()->addGraph(lines); - JKQTPgeoEllipse* ell1=new JKQTPgeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); + JKQTPGeoEllipse* ell1=new JKQTPGeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); plotGeo->get_plotter()->addGraph(ell1); -// JKQTPgeoArc* arc=new JKQTPgeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); +// JKQTPGeoArc* arc=new JKQTPGeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); //plotGeo->get_plotter()->addGraph(arc); -// JKQTPgeoPie* pie=new JKQTPgeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); +// JKQTPGeoPie* pie=new JKQTPGeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); //plotGeo->get_plotter()->addGraph(pie); -// JKQTPgeoChord* chord=new JKQTPgeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); +// JKQTPGeoChord* chord=new JKQTPGeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); //plotGeo->get_plotter()->addGraph(chord); - JKQTPgeoInfiniteLine* iline=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); + JKQTPGeoInfiniteLine* iline=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); plotGeo->get_plotter()->addGraph(iline); - JKQTPgeoInfiniteLine* iline1=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0, QColor("red"), 3); + JKQTPGeoInfiniteLine* iline1=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0, QColor("red"), 3); plotGeo->get_plotter()->addGraph(iline1); - JKQTPgeoInfiniteLine* iline2=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,0,1, QColor("red"), 3); + JKQTPGeoInfiniteLine* iline2=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,0,1, QColor("red"), 3); plotGeo->get_plotter()->addGraph(iline2); - JKQTPgeoInfiniteLine* iline3=new JKQTPgeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0.5, QColor("green"), 3); + JKQTPGeoInfiniteLine* iline3=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0.5, QColor("green"), 3); iline3->set_two_sided(true); plotGeo->get_plotter()->addGraph(iline3); - JKQTPgeoText* text=new JKQTPgeoText(plotGeo->get_plotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); + JKQTPGeoText* text=new JKQTPGeoText(plotGeo->get_plotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); plotGeo->get_plotter()->addGraph(text); plotGeo->set_doDrawing(true); diff --git a/examples/jkqtplot_test/TestWidgetGraphs.cpp b/examples/jkqtplot_test/TestWidgetGraphs.cpp index e8465ab1c5..11f1281986 100644 --- a/examples/jkqtplot_test/TestWidgetGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetGraphs.cpp @@ -19,11 +19,11 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : ovlTime.start(); - plot=new JKQtPlotter(true, this); + plot=new JKQTPLotter(true, this); plot->set_doDrawing(false); - plotBot=new JKQtPlotter(false, this, plot->getDatastore()); - plotBot2=new JKQtPlotter(false, this, plot->getDatastore()); - ovl1=new JKQTPoverlayVerticalLine(0.0, tr("test"), plot->get_plotter()); + plotBot=new JKQTPLotter(false, this, plot->getDatastore()); + plotBot2=new JKQTPLotter(false, this, plot->getDatastore()); + ovl1=new JKQTPOverlayVerticalLine(0.0, tr("test"), plot->get_plotter()); plot->get_plotter()->addOverlayElement(ovl1); plot->setObjectName("plot"); plotBot->setObjectName("plotBot"); @@ -48,7 +48,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : 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*))); + connect(plot, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTPLotter*)), plotBot, SLOT(synchronizeXAxis(double,double,double,double,JKQTPLotter*))); plot->get_plotter()->set_gridPrinting(true); plot->get_plotter()->addGridPrintingPlotter(0,1,plotBot->get_plotter()); plot->get_plotter()->addGridPrintingPlotter(0,2,plotBot2->get_plotter()); @@ -75,16 +75,16 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : y21r[i]=double(rand()%100)/10.0-5.0; y21re[i]=y21r[i]*double(rand()%10)/40.0; } - JKQTPdatastore* ds=plot->get_plotter()->getDatastore(); + JKQTPDatastore* ds=plot->get_plotter()->getDatastore(); //size_t cx1=ds->addColumn(x1, N1, "x1"); //size_t cy11=ds->addColumn(y11, N1, "y11"); //size_t cy12=ds->addColumn(y12, N1, "y12"); //size_t cy13=ds->addColumn(y13, N1, "y13"); - //plot->addGraph(cx1, cy11, "$\\sin(x)$", JKQTPpoints); - //plot->addGraph(cy12, cx1, "$\\cos(x)$", JKQTPfilledCurveY); - //plot->addGraphWithXError(cy12, cx1, cy13, "$\\cos(x)$ with errors", JKQTPfilledCurveY, JKQTPerrorPolygons); + //plot->addGraph(cx1, cy11, "$\\sin(x)$", JKQTPPoints); + //plot->addGraph(cy12, cx1, "$\\cos(x)$", JKQTPFilledCurveY); + //plot->addGraphWithXError(cy12, cx1, cy13, "$\\cos(x)$ with errors", JKQTPFilledCurveY, JKQTPErrorPolygons); for (unsigned int i=0; iaddColumn(y21re, N2, "y21re"); - size_t id=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPfilledCurveX); - JKQTPfilledCurveXGraph* fcxgr=qobject_cast(plot->get_plotter()->getGraph(id)); + size_t id=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPFilledCurveX); + JKQTPFilledCurveXGraph* fcxgr=qobject_cast(plot->get_plotter()->getGraph(id)); if (fcxgr) { fcxgr->set_baseline(2); } - size_t yeb=plot->get_plotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPfilledCurveX); + size_t yeb=plot->get_plotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPFilledCurveX); plteErrors=plot->get_plotter()->getGraph(yeb); setErrorStyle(0); - yeb=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPlinesPoints); + yeb=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPLinesPoints); plteSymbols=plot->get_plotter()->getGraph(yeb); - pltePlot2=new JKQTPxyLineErrorGraph(plotBot->get_plotter()); + pltePlot2=new JKQTPXYLineErrorGraph(plotBot->get_plotter()); pltePlot2->set_xColumn(cx2r); pltePlot2->set_yColumn(cy21r); pltePlot2->set_title(tr("random numbers")); pltePlot2->set_drawLine(true); pltePlot2->set_yErrorColumn(cy21re); - pltePlot2->set_yErrorStyle(JKQTPerrorBarsPolygons); - pltePlot2->set_symbol(JKQTPfilledStar); + pltePlot2->set_yErrorStyle(JKQTPErrorBarsPolygons); + pltePlot2->set_symbol(JKQTPFilledStar); plotBot->get_plotter()->addGraph(pltePlot2); plotBot->zoomToFit(); @@ -164,21 +164,21 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : ts<<"bars 1"<<"bars 2"<<"bars 3"; plot->get_plotter()->addVerticalBargraph(cb, cbp, ts); - JKQTPverticalRange* r1=new JKQTPverticalRange(plot->get_plotter()); + JKQTPVerticalRange* r1=new JKQTPVerticalRange(plot->get_plotter()); r1->set_rangeMin(5); r1->set_rangeMax(10); r1->set_rangeCenter(7.5); r1->set_title("vert. range"); plot->get_plotter()->addGraph(r1); - JKQTPhorizontalRange* r2=new JKQTPhorizontalRange(plot->get_plotter()); + JKQTPHorizontalRange* r2=new JKQTPHorizontalRange(plot->get_plotter()); r2->set_rangeMin(5); r2->set_rangeMax(10); r2->set_rangeCenter(7.5); r2->set_title("hor. range"); plot->get_plotter()->addGraph(r2); - JKQTPboxplotVerticalGraph* box=new JKQTPboxplotVerticalGraph(plotBot2->get_plotter()); + JKQTPBoxplotVerticalGraph* box=new JKQTPBoxplotVerticalGraph(plotBot2->get_plotter()); box->set_posColumn(cbxbox); box->set_medianColumn(cbmed); box->set_meanColumn(cbmean); @@ -190,7 +190,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : plotBot2->addGraph(box); plotBot2->zoomToFit(); - /*JKQTPyFunctionLineGraph* g=new JKQTPyFunctionLineGraph(&plot); + /*JKQTPYFunctionLineGraph* g=new JKQTPYFunctionLineGraph(&plot); g->set_title("function 1"); g->set_plotFunction(f1); g->set_errorFunction(f1e); @@ -199,18 +199,18 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : g->set_color(QColor("red")); plot->addGraph(g);*/ - /*JKQTPxFunctionLineGraph* g=new JKQTPxFunctionLineGraph(&plot); + /*JKQTPXFunctionLineGraph* g=new JKQTPXFunctionLineGraph(&plot); g->set_title("function 2"); g->set_plotFunction(f2); plot->addGraph(g);*/ - /*JKQTPstepVerticalGraph* g=new JKQTPstepVerticalGraph(&plot); + /*JKQTPStepVerticalGraph* g=new JKQTPStepVerticalGraph(&plot); g->set_xColumn(cy11); g->set_yColumn(cx1); g->set_fillCurve(true); g->set_valuesCentered(true); plot->addGraph(g); - plot->addGraph(cy11, cx1, "$\\sin(x)$", JKQTPpoints);*/ + plot->addGraph(cy11, cx1, "$\\sin(x)$", JKQTPPoints);*/ plot->set_doDrawing(true); plot->get_plotter()->zoomToFit(true, false);//, true); @@ -232,12 +232,12 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : layout->addWidget(chkInvertY); layout->addWidget(chkInvertX); layout->addWidget(chkInvertY); - JKQTPSymbolComboBox* cmbJKQTPplotSymbol=new JKQTPSymbolComboBox(this); - cmbJKQTPplotSymbol->setSymbol(JKQTPplus); - connect(cmbJKQTPplotSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(setESSymbol(int))); - layout->addWidget(cmbJKQTPplotSymbol); - JKQTPerrorPlotstyleComboBox* cmbErrors=new JKQTPerrorPlotstyleComboBox(this); - cmbErrors->setCurrentErrorStyle(JKQTPerrorBars); + JKQTPSymbolComboBox* cmbJKQTPPlotSymbol=new JKQTPSymbolComboBox(this); + cmbJKQTPPlotSymbol->setSymbol(JKQTPPlus); + connect(cmbJKQTPPlotSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(setESSymbol(int))); + layout->addWidget(cmbJKQTPPlotSymbol); + JKQTPErrorPlotstyleComboBox* cmbErrors=new JKQTPErrorPlotstyleComboBox(this); + cmbErrors->setCurrentErrorStyle(JKQTPErrorBars); connect(cmbErrors, SIGNAL(currentIndexChanged(int)), this, SLOT(setErrorStyle(int))); layout->addWidget(cmbErrors); QDoubleSpinBox* spinScale=new QDoubleSpinBox(this); @@ -258,13 +258,13 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : layout->addWidget(cmbSortOrder2); - JKQTPkeyLayoutComboBox* cmbKeyLayout=new JKQTPkeyLayoutComboBox(this); - connect(cmbKeyLayout, SIGNAL(currentLayoutChanged(JKQTPkeyLayout)), this, SLOT(setKeyLayout2(JKQTPkeyLayout))); + JKQTPKeyLayoutComboBox* cmbKeyLayout=new JKQTPKeyLayoutComboBox(this); + connect(cmbKeyLayout, SIGNAL(currentLayoutChanged(JKQTPKeyLayout)), this, SLOT(setKeyLayout2(JKQTPKeyLayout))); layout->addWidget(cmbKeyLayout); - JKQTPkeyPositionComboBox* cmbKeyPos=new JKQTPkeyPositionComboBox(this); - connect(cmbKeyPos, SIGNAL(currentPositionChanged(JKQTPkeyPosition)), this, SLOT(setKeyPos2(JKQTPkeyPosition))); + JKQTPKeyPositionComboBox* cmbKeyPos=new JKQTPKeyPositionComboBox(this); + connect(cmbKeyPos, SIGNAL(currentPositionChanged(JKQTPKeyPosition)), this, SLOT(setKeyPos2(JKQTPKeyPosition))); layout->addWidget(cmbKeyPos); @@ -303,14 +303,14 @@ void TestWidgetGraphs::setErrorStyle(int /*index*/) { QComboBox* cmb=qobject_cast(sender()); if (cmb) { - JKQTPxyGraphErrors* exy=dynamic_cast(plteErrors); -// JKQTPxGraphErrors* ex=dynamic_cast(plteErrors); - JKQTPyGraphErrors* ey=dynamic_cast(plteErrors); + JKQTPXYGraphErrors* exy=dynamic_cast(plteErrors); +// JKQTPXGraphErrors* ex=dynamic_cast(plteErrors); + JKQTPYGraphErrors* ey=dynamic_cast(plteErrors); if (exy) { - exy->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); + exy->set_yErrorStyle(String2JKQTPErrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); } if (ey) { - ey->set_yErrorStyle(String2JKQTPerrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); + ey->set_yErrorStyle(String2JKQTPErrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); } plot->update_plot(); } @@ -320,9 +320,9 @@ void TestWidgetGraphs::setESSymbol(int /*index*/) { QComboBox* cmb=qobject_cast(sender()); if (cmb) { - JKQTPxyLineGraph* exy=dynamic_cast(plteSymbols); + JKQTPXYLineGraph* exy=dynamic_cast(plteSymbols); if (exy) { - exy->set_symbol(String2JKQTPgraphSymbols(cmb->itemData(cmb->currentIndex()).toString())); + exy->set_symbol(String2JKQTPGraphSymbols(cmb->itemData(cmb->currentIndex()).toString())); } plot->update_plot(); @@ -332,13 +332,13 @@ void TestWidgetGraphs::setESSymbol(int /*index*/) void TestWidgetGraphs::setSortOrder2(int index) { - if (index==0) pltePlot2->set_sortData(JKQTPxyGraph::Unsorted); - if (index==1) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedX); - if (index==2) pltePlot2->set_sortData(JKQTPxyLineGraph::SortedY); + if (index==0) pltePlot2->set_sortData(JKQTPXYGraph::Unsorted); + if (index==1) pltePlot2->set_sortData(JKQTPXYLineGraph::SortedX); + if (index==2) pltePlot2->set_sortData(JKQTPXYLineGraph::SortedY); plotBot->update_plot(); } -void TestWidgetGraphs::setKeyLayout2(JKQTPkeyLayout layout) +void TestWidgetGraphs::setKeyLayout2(JKQTPKeyLayout layout) { plot->get_plotter()->set_keyLayout(layout); plotBot->get_plotter()->set_keyLayout(layout); @@ -348,7 +348,7 @@ void TestWidgetGraphs::setKeyLayout2(JKQTPkeyLayout layout) plotBot2->update_plot(); } -void TestWidgetGraphs::setKeyPos2(JKQTPkeyPosition layout) +void TestWidgetGraphs::setKeyPos2(JKQTPKeyPosition layout) { plot->get_plotter()->set_keyPosition(layout); plotBot->get_plotter()->set_keyPosition(layout); diff --git a/examples/jkqtplot_test/TestWidgetGraphs.h b/examples/jkqtplot_test/TestWidgetGraphs.h index 49926ee021..f4293e77cb 100644 --- a/examples/jkqtplot_test/TestWidgetGraphs.h +++ b/examples/jkqtplot_test/TestWidgetGraphs.h @@ -43,8 +43,8 @@ class TestWidgetGraphs : public QWidget void setSortOrder2(int index); - void setKeyLayout2(JKQTPkeyLayout layout); - void setKeyPos2(JKQTPkeyPosition layout); + void setKeyLayout2(JKQTPKeyLayout layout); + void setKeyPos2(JKQTPKeyPosition layout); protected: double x1[N1], x2[N2], x2r[N2]/*, x3[N3]*/; @@ -53,15 +53,15 @@ class TestWidgetGraphs : public QWidget double b1[N3], b2[N3], b3[N3]; - JKQTPoverlayVerticalLine* ovl1; - JKQtPlotter* plot; - JKQtPlotter* plotLOG; - JKQtPlotter* plotBot; - JKQtPlotter* plotBot2; + JKQTPOverlayVerticalLine* ovl1; + JKQTPLotter* plot; + JKQTPLotter* plotLOG; + JKQTPLotter* plotBot; + JKQTPLotter* plotBot2; - JKQTPplotElement* plteErrors; - JKQTPplotElement* plteSymbols; - JKQTPxyLineErrorGraph* pltePlot2; + JKQTPPlotElement* plteErrors; + JKQTPPlotElement* plteSymbols; + JKQTPXYLineErrorGraph* pltePlot2; int ovlCnt; diff --git a/examples/jkqtplot_test/TestWidgetImages.cpp b/examples/jkqtplot_test/TestWidgetImages.cpp index dec33b0aed..b9b89a82d2 100644 --- a/examples/jkqtplot_test/TestWidgetImages.cpp +++ b/examples/jkqtplot_test/TestWidgetImages.cpp @@ -19,7 +19,7 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : layouti->addLayout(layWid); setLayout(layouti); resize(1000, 800); - plotImg=new JKQtPlotter(true, this); + plotImg=new JKQTPLotter(true, this); plotImg->set_doDrawing(false); plotImg->get_plotter()->set_plotLabel(tr("\\textbf{image plot}")); plotImg->setObjectName("plotImg"); diff --git a/examples/jkqtplot_test/TestWidgetImages.h b/examples/jkqtplot_test/TestWidgetImages.h index c4ffa493d0..f636b09143 100644 --- a/examples/jkqtplot_test/TestWidgetImages.h +++ b/examples/jkqtplot_test/TestWidgetImages.h @@ -47,7 +47,7 @@ class TestWidgetImages : public QWidget JKQTPMathImage* pimg2; JKQTPMathImage* pimg3; - JKQtPlotter* plotImg; + JKQTPLotter* plotImg; }; diff --git a/examples/jkqtplot_test/TestWidgetLogGraphs.cpp b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp index ccd3d19137..b189d20082 100644 --- a/examples/jkqtplot_test/TestWidgetLogGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp @@ -13,12 +13,12 @@ TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : QWidget(parent) { - JKQtPlotter* plotLOG=new JKQtPlotter(this); + JKQTPLotter* plotLOG=new JKQTPLotter(this); plotLOG->set_doDrawing(false); plotLOG->setObjectName("plotLOG"); plotLOG->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plotLOG/"); - JKQTPdatastore* ds=plotLOG->get_plotter()->getDatastore(); + JKQTPDatastore* ds=plotLOG->get_plotter()->getDatastore(); QVector x,y; for (unsigned int i=0; i(i+1)/static_cast(N2)*15.0; @@ -38,7 +38,7 @@ TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : resize(1000, 800); - plotLOG->get_plotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPlines); + plotLOG->get_plotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPLines); plotLOG->set_doDrawing(true); diff --git a/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp index 39cec268cf..5644b64f49 100644 --- a/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp @@ -17,7 +17,7 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : setLayout(layoutPSP); resize(1000, 800); - plotPSP=new JKQtPlotter(true, this); + plotPSP=new JKQTPLotter(true, this); plotPSP->set_doDrawing(false); plotPSP->get_plotter()->set_plotLabel(tr("\\textbf{parametrized scatter plots}")); plotPSP->setObjectName("plotPSP"); @@ -50,7 +50,7 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : int psps=plotPSP->getDatastore()->addCopiedColumn(dataS, "size"); int pspsy=plotPSP->getDatastore()->addCopiedColumn(dataSy, "symbol"); - pltePSPCol=new JKQTPxyParametrizedErrorScatterGraph(plotPSP->get_plotter()); + pltePSPCol=new JKQTPXYParametrizedErrorScatterGraph(plotPSP->get_plotter()); pltePSPCol->set_title(tr("changing color")); pltePSPCol->set_xColumn(pspx); pltePSPCol->set_yColumn(pspy); @@ -61,7 +61,7 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : pltePSPCol->set_drawLine(true); plotPSP->get_plotter()->addGraph(pltePSPCol); - pltePSPSize=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSize=new JKQTPXYParametrizedScatterGraph(plotPSP->get_plotter()); pltePSPSize->set_xColumn(pspx); pltePSPSize->set_yColumn(pspy1); pltePSPSize->set_sizeColumn(psps); @@ -69,7 +69,7 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : plotPSP->get_plotter()->addGraph(pltePSPSize); - pltePSPSymb=new JKQTPxyParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSymb=new JKQTPXYParametrizedScatterGraph(plotPSP->get_plotter()); pltePSPSymb->set_xColumn(pspx); pltePSPSymb->set_yColumn(pspy3); pltePSPSymb->set_symbolColumn(pspsy); diff --git a/examples/jkqtplot_test/TestWidgetParamScatterPlots.h b/examples/jkqtplot_test/TestWidgetParamScatterPlots.h index d9c8d920ad..e5973e41f2 100644 --- a/examples/jkqtplot_test/TestWidgetParamScatterPlots.h +++ b/examples/jkqtplot_test/TestWidgetParamScatterPlots.h @@ -40,10 +40,10 @@ class TestWidgetParamScatterPlots : public QWidget protected: - JKQtPlotter* plotPSP; - JKQTPxyParametrizedErrorScatterGraph* pltePSPCol; - JKQTPxyParametrizedScatterGraph* pltePSPSize; - JKQTPxyParametrizedScatterGraph* pltePSPSymb; + JKQTPLotter* plotPSP; + JKQTPXYParametrizedErrorScatterGraph* pltePSPCol; + JKQTPXYParametrizedScatterGraph* pltePSPSize; + JKQTPXYParametrizedScatterGraph* pltePSPSymb; diff --git a/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp index b8095c4ae0..1ade84335e 100644 --- a/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp @@ -18,7 +18,7 @@ TestWidgetPeaksPlots::TestWidgetPeaksPlots(QWidget *parent) : QVBoxLayout* layoutpeaks=new QVBoxLayout(this); setLayout(layoutpeaks); resize(1000, 800); - plotPeaks=new JKQtPlotter(true, this); + plotPeaks=new JKQTPLotter(true, this); plotPeaks->set_doDrawing(false); plotPeaks->get_plotter()->set_plotLabel(tr("\\textbf{peaks stream plot}")); plotPeaks->setObjectName("plotPeaks"); diff --git a/examples/jkqtplot_test/TestWidgetPeaksPlots.h b/examples/jkqtplot_test/TestWidgetPeaksPlots.h index ba1b89dbf8..678742fbda 100644 --- a/examples/jkqtplot_test/TestWidgetPeaksPlots.h +++ b/examples/jkqtplot_test/TestWidgetPeaksPlots.h @@ -34,7 +34,7 @@ class TestWidgetPeaksPlots : public QWidget protected: - JKQtPlotter* plotPeaks; + JKQTPLotter* plotPeaks; JKQTPPeakStreamGraph* graphPeakStream1; JKQTPPeakStreamGraph* graphPeakStream2; diff --git a/examples/jkqtplot_test/TestWidgetRGBImages.cpp b/examples/jkqtplot_test/TestWidgetRGBImages.cpp index 04f5f6856c..4a4357f06e 100644 --- a/examples/jkqtplot_test/TestWidgetRGBImages.cpp +++ b/examples/jkqtplot_test/TestWidgetRGBImages.cpp @@ -19,7 +19,7 @@ TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : QFormLayout* frm=new QFormLayout(nullptr); winrgb->setLayout(layoutrgb); winrgb->resize(1000, 800); - plotImgRGB=new JKQtPlotter(true, winrgb); + plotImgRGB=new JKQTPLotter(true, winrgb); plotImgRGB->set_doDrawing(false); plotImgRGB->get_plotter()->set_plotLabel(tr("\\textbf{RGB image plot}")); plotImgRGB->setObjectName("plotImgRGB"); diff --git a/examples/jkqtplot_test/TestWidgetRGBImages.h b/examples/jkqtplot_test/TestWidgetRGBImages.h index ed7f245c3c..f55f81cc9f 100644 --- a/examples/jkqtplot_test/TestWidgetRGBImages.h +++ b/examples/jkqtplot_test/TestWidgetRGBImages.h @@ -54,7 +54,7 @@ class TestWidgetRGBImages : public QWidget int rgb_colr, rgb_colb, rgb_colg, rgb_cola; - JKQtPlotter* plotImgRGB; + JKQTPLotter* plotImgRGB; JKQTPRGBMathImage* rgbimg; JKQTPColumnRGBMathImage* rgbimg2; diff --git a/examples/jkqtplot_test/jkqtpemfengineadapter.h b/examples/jkqtplot_test/jkqtpemfengineadapter.h index 778846a399..e6887b31fb 100644 --- a/examples/jkqtplot_test/jkqtpemfengineadapter.h +++ b/examples/jkqtplot_test/jkqtpemfengineadapter.h @@ -6,7 +6,7 @@ #include #include "../../../jkqtpbaseplotter.h" -class JKQTPEmfEngineAdapter : public JKQtBasePlotter::JKQTPPaintDeviceAdapter +class JKQTPEmfEngineAdapter : public JKQTBasePlotter::JKQTPPaintDeviceAdapter { public: JKQTPEmfEngineAdapter(); diff --git a/examples/jkqtplot_test/jkqtplot_test.pro b/examples/jkqtplot_test/jkqtplot_test.pro index 361d6c34f3..a3d2f8e9ff 100644 --- a/examples/jkqtplot_test/jkqtplot_test.pro +++ b/examples/jkqtplot_test/jkqtplot_test.pro @@ -58,7 +58,7 @@ QT += core gui xml svg greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += $$PWD #$$PWD/../../lib INCLUDEPATH += ../../lib diff --git a/examples/jkqtplot_test/testmain.cpp b/examples/jkqtplot_test/testmain.cpp index 8cd42b2cde..efca1ea5cf 100644 --- a/examples/jkqtplot_test/testmain.cpp +++ b/examples/jkqtplot_test/testmain.cpp @@ -27,7 +27,7 @@ TestMain::TestMain(QWidget *parent) : { #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) #ifdef Q_WS_WIN - JKQtBasePlotter::registerPaintDeviceAdapter(new JKQTPEmfEngineAdapter()); + JKQTBasePlotter::registerPaintDeviceAdapter(new JKQTPEmfEngineAdapter()); #endif #endif diff --git a/examples/simpletest/README.md b/examples/simpletest/README.md index eaf9ab6cfb..7b1e4ef7ee 100644 --- a/examples/simpletest/README.md +++ b/examples/simpletest/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Very simple line-graph {#JKQTPlotterSimpleTest} -This project (see `./examples/simpletest/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. +# Example (JKQTPLotter): Very simple line-graph {#JKQTPLotterSimpleTest} +This project (see `./examples/simpletest/`) simply creates a JKQTPLotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. The QMake project looks like this (see [`jkqtplotter_simpletest.pro`](../simpletest/jkqtplotter_simpletest.pro): ```.qmake # source code for this simple demo @@ -13,7 +13,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest -# include JKQtPlotter source headers and link against library +# include JKQTPLotter source headers and link against library DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { @@ -23,7 +23,7 @@ CONFIG (debug, debug|release) { } ``` -Alternatively to linking agains a `libjkqtplotter`, you can also directy add the JKQtPlotter sources to the project: +Alternatively to linking agains a `libjkqtplotter`, you can also directy add the JKQTPLotter sources to the project: ```.qmake # source code for this simple demo SOURCES = jkqtplotter_simpletest.cpp @@ -36,7 +36,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest -# include JKQtPlotter source code +# include JKQTPLotter source code include(../../lib/jkqtplotter.pri) ``` The soruce code of the main application is (see [`jkqtplotter_simpletest.cpp`](../simpletest/jkqtplotter_simpletest.cpp): @@ -51,8 +51,8 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore // (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for a simple plot (a sine curve) QVector X, Y; @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) Y<addCopiedColumn(Y, "y"); // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph1=new JKQTPXYLineGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_title(QObject::tr("sine graph")); diff --git a/examples/simpletest/jkqtplotter_simpletest.cpp b/examples/simpletest/jkqtplotter_simpletest.cpp index ef04f4a6cd..d5d39e4ca5 100644 --- a/examples/simpletest/jkqtplotter_simpletest.cpp +++ b/examples/simpletest/jkqtplotter_simpletest.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest.cpp - * A very basic example for the usage of JKQtPlotter + * A very basic example for the usage of JKQTPLotter * - * \ref JKQTPlotterSimpleTest + * \ref JKQTPLotterSimpleTest */ #include @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for a simple plot (a sine curve) QVector X, Y; @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) Y<addCopiedColumn(Y, "y"); // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph1=new JKQTPXYLineGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_title(QObject::tr("sine graph")); diff --git a/examples/simpletest/jkqtplotter_simpletest.pro b/examples/simpletest/jkqtplotter_simpletest.pro index 1d96501593..c66bb673c8 100644 --- a/examples/simpletest/jkqtplotter_simpletest.pro +++ b/examples/simpletest/jkqtplotter_simpletest.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest -# include JKQtPlotter source headers and link against library +# include JKQTPLotter source headers and link against library DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_barchart/README.md b/examples/simpletest_barchart/README.md index e99239582a..cf6b66d068 100644 --- a/examples/simpletest_barchart/README.md +++ b/examples/simpletest_barchart/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple barchart {#JKQtPlotterBarcharts} -This project (see [`simpletest_barchart`](../simpletest_barchart) simply creates a JKQtPlotter widget (as a new window) and adds several barcharts. They are ordered in groups. +# Example (JKQTPLotter): Simple barchart {#JKQTPLotterBarcharts} +This project (see [`simpletest_barchart`](../simpletest_barchart) simply creates a JKQTPLotter widget (as a new window) and adds several barcharts. They are ordered in groups. The soruce code of the main application is (see [`jkqtplotter_simpletest_barchart.cpp`](../simpletest_barchart/jkqtplotter_simpletest_barchart.cpp): ```.cpp @@ -13,11 +13,11 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; + JKQTPLotter plot; plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for three simple barchart QString L[Ndata]={ "cat. A", "cat. B", "cat. C", "cat. D", "other"}; @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) double Y2[Ndata]={ -5, -3, 1, 3, 6}; double Y3[Ndata]={ 6, 2, 5, 3, 6}; - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise) // the variables columnX and columnY... will contain the internal column ID of the // newly created columns with names "x" and "y..." and the (copied) data from X @@ -37,15 +37,15 @@ int main(int argc, char* argv[]) size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: - JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph1=new JKQTPBarVerticalGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY1); graph1->set_title(QObject::tr("dataset 1")); - JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph2=new JKQTPBarVerticalGraph(&plot); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_title(QObject::tr("dataset 2")); - JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph3=new JKQTPBarVerticalGraph(&plot); graph3->set_xColumn(columnX); graph3->set_yColumn(columnY3); graph3->set_title(QObject::tr("dataset 3")); @@ -57,7 +57,7 @@ int main(int argc, char* argv[]) plot.addGraph(graph3); // 6. now we set the graphs, so they are plotted side-by-side - // This function searches all JKQTPbarVerticalGraph in the current + // This function searches all JKQTPBarVerticalGraph in the current // plot and sets their shift/scale so they form a nice plot with // side-by-side groups graph1->autoscaleBarWidthAndShift(0.75, 1); @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); // 9 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp index 14efa14be4..19d358f7c1 100644 --- a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_barchart.cpp - * Shows how to draw Barcharts with JKQtPlotter + * Shows how to draw Barcharts with JKQTPLotter * - * \ref JKQtPlotterBarcharts + * \ref JKQTPLotterBarcharts */ #include @@ -15,11 +15,11 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; + JKQTPLotter plot; plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for three simple barchart QString L[Ndata]={ "cat. A", "cat. C", "cat. B", "cat. D", "other"}; // unsorted category axis @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) double Y2[Ndata]={ -5, -3, 1, 3, 6}; double Y3[Ndata]={ 6, 2, 5, 3, 6}; - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise) // the variables columnX and columnY... will contain the internal column ID of the // newly created columns with names "x" and "y..." and the (copied) data from X @@ -41,15 +41,15 @@ int main(int argc, char* argv[]) size_t columnY3=ds->addCopiedColumn(Y3, Ndata, "y3"); // 4. create graphs in the plot, which plots the dataset X/Y1, X/Y2 and X/Y3: - JKQTPbarVerticalGraph* graph1=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph1=new JKQTPBarVerticalGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY1); graph1->set_title(QObject::tr("dataset 1")); - JKQTPbarVerticalGraph* graph2=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph2=new JKQTPBarVerticalGraph(&plot); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_title(QObject::tr("dataset 2")); - JKQTPbarVerticalGraph* graph3=new JKQTPbarVerticalGraph(&plot); + JKQTPBarVerticalGraph* graph3=new JKQTPBarVerticalGraph(&plot); graph3->set_xColumn(columnX); graph3->set_yColumn(columnY3); graph3->set_title(QObject::tr("dataset 3")); @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) plot.addGraph(graph3); // 6. now we set the graphs, so they are plotted side-by-side - // This function searches all JKQTPbarHorizontalGraph in the current + // This function searches all JKQTPBarHorizontalGraph in the current // plot and sets their shift/scale so they form a nice plot with // side-by-side groups graph1->autoscaleBarWidthAndShift(0.75, 1); @@ -80,8 +80,8 @@ int main(int argc, char* argv[]) // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); // 9 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro index 9fa0085cab..cc0921a468 100644 --- a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_barchart -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_dateaxes/README.md b/examples/simpletest_dateaxes/README.md index 26fad5869c..b0ba74440e 100644 --- a/examples/simpletest_dateaxes/README.md +++ b/examples/simpletest_dateaxes/README.md @@ -1,7 +1,7 @@ -# Example (JKQtPlotter): Date/Time Axes {#JKQtPlotterDateTimeAxes} +# Example (JKQTPLotter): Date/Time Axes {#JKQTPLotterDateTimeAxes} ## Date Axis -This project (see `./examples/simpletest_dateaxes/`) simply creates a JKQtPlotter widget (as a new window) with the X-axis showing time or date(-time) values, formated as such. +This project (see `./examples/simpletest_dateaxes/`) simply creates a JKQTPLotter widget (as a new window) with the X-axis showing time or date(-time) values, formated as such. The source code of the main application can be found in [`jkqtplotter_simpletest_dateaxes.cpp`](../simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp). @@ -39,10 +39,10 @@ The parsed data looks like this (data was taken from http://wetter.mpg-ge.de/NOA ... ``` -Then two graphs are added. One of type `JKQTPfilledVerticalRangeGraph` plots the range of min+max temperature for each month: +Then two graphs are added. One of type `JKQTPFilledVerticalRangeGraph` plots the range of min+max temperature for each month: ```.cpp // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) - JKQTPfilledVerticalRangeGraph* graphTemperatureRange=new JKQTPfilledVerticalRangeGraph(&plot); + JKQTPFilledVerticalRangeGraph* graphTemperatureRange=new JKQTPFilledVerticalRangeGraph(&plot); // 4. copy data into datastore and immediately set the yColumn size_t colDate=ds->addCopiedColumn(date, "date"); @@ -66,7 +66,7 @@ On top of that plot, a second plot is added, which draws the average temperature ```.cpp // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) - JKQTPxyLineErrorGraph* graphTemperature=new JKQTPxyLineErrorGraph(&plot); + JKQTPXYLineErrorGraph* graphTemperature=new JKQTPXYLineErrorGraph(&plot); // 4. copy data into datastore and immediately set the yColumn size_t colDate=ds->addCopiedColumn(date, "date"); @@ -79,7 +79,7 @@ On top of that plot, a second plot is added, which draws the average temperature // 6. average data // don't use symbols - graphTemperature->set_symbol(JKQTPnoSymbol); + graphTemperature->set_symbol(JKQTPNoSymbol); // set the line width graphTemperature->set_lineWidth(1); // draw small symbols diff --git a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp index 1d3485e96a..490b65ac2c 100644 --- a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_dateaxes.cpp - * Shows how to use date/time axes with JKQtPlotter + * Shows how to use date/time axes with JKQTPLotter * - * \ref JKQtPlotterDateTimeAxes + * \ref JKQTPLotterDateTimeAxes */ #include @@ -15,10 +15,10 @@ #include "jkqtplottertools/jkqtptools.h" #include "jkqtplotter/jkqtpgraphsfilledcurve.h" -void drawWithDateAxis(JKQtPlotter& plot) { +void drawWithDateAxis(JKQTPLotter& plot) { // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data vectors with data parsed from a CSV-file QVector date; @@ -43,8 +43,8 @@ void drawWithDateAxis(JKQtPlotter& plot) { } // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) - JKQTPfilledVerticalRangeGraph* graphTemperatureRange=new JKQTPfilledVerticalRangeGraph(&plot); - JKQTPxyLineErrorGraph* graphTemperature=new JKQTPxyLineErrorGraph(&plot); + JKQTPFilledVerticalRangeGraph* graphTemperatureRange=new JKQTPFilledVerticalRangeGraph(&plot); + JKQTPXYLineErrorGraph* graphTemperature=new JKQTPXYLineErrorGraph(&plot); // 4. copy data into datastore and immediately set the yColumn size_t colDate=ds->addCopiedColumn(date, "date"); @@ -67,7 +67,7 @@ void drawWithDateAxis(JKQtPlotter& plot) { // 6. average data // don't use symbols - graphTemperature->set_symbol(JKQTPnoSymbol); + graphTemperature->set_symbol(JKQTPNoSymbol); // set the line width graphTemperature->set_lineWidth(1); // draw small symbols @@ -98,9 +98,9 @@ void drawWithDateAxis(JKQtPlotter& plot) { plot.setWindowTitle("Date Axis"); } -void drawWithTimeAxis(JKQtPlotter& plot) { +void drawWithTimeAxis(JKQTPLotter& plot) { // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data vectors with data parsed from a CSV-file QVector time; @@ -124,7 +124,7 @@ void drawWithTimeAxis(JKQtPlotter& plot) { } // 3. add a plot for the data mean line (graphTemperature) and range (graphTemperatureRange) - JKQTPxyLineErrorGraph* graphTemperature=new JKQTPxyLineErrorGraph(&plot); + JKQTPXYLineErrorGraph* graphTemperature=new JKQTPXYLineErrorGraph(&plot); // 4. copy data into datastore and immediately set the yColumn size_t colDate=ds->addCopiedColumn(time, "time"); @@ -134,7 +134,7 @@ void drawWithTimeAxis(JKQtPlotter& plot) { // 6. average data // don't use symbols - graphTemperature->set_symbol(JKQTPcross); + graphTemperature->set_symbol(JKQTPCross); // set the line width graphTemperature->set_lineWidth(1); // draw small symbols @@ -169,10 +169,10 @@ void drawWithTimeAxis(JKQtPlotter& plot) { int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plotDate; + JKQTPLotter plotDate; drawWithDateAxis(plotDate); plotDate.move(100,100); - JKQtPlotter plotTime; + JKQTPLotter plotTime; drawWithTimeAxis(plotTime); plotTime.move(100,550); diff --git a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro index 7ad1ea6314..9936d95036 100644 --- a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_dateaxes -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_errorbarstyles/README.md b/examples/simpletest_errorbarstyles/README.md index cce118c655..813b018255 100644 --- a/examples/simpletest_errorbarstyles/README.md +++ b/examples/simpletest_errorbarstyles/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Different Types of Errorindicators {#JKQtPlotterErrorBarStyles} -This project (see `./examples/simpletest_errorbarstyles/`) simply creates a JKQtPlotter widget (as a new window) and adds several curves show-casing different styles of error indicators. Data is initialized from two QVector objects. +# Example (JKQTPLotter): Different Types of Errorindicators {#JKQTPLotterErrorBarStyles} +This project (see `./examples/simpletest_errorbarstyles/`) simply creates a JKQTPLotter widget (as a new window) and adds several curves show-casing different styles of error indicators. Data is initialized from two QVector objects. The source code of the main application can be found in [`jkqtplotter_simpletest_errorbarstyles.cpp`](../simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp). @@ -11,7 +11,7 @@ First some data is added to the internal datastore (mostly, like explained in se // the array showXandYError indicates whether we want x- and y-error // for a style for all stywhere this is false, only y-error-indicators // are shown - QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; + QVector errorStyles {JKQTPNoError, JKQTPErrorBars, JKQTPErrorSimpleBars, JKQTPErrorLines, JKQTPErrorPolygons, JKQTPErrorBoxes, JKQTPErrorEllipses, JKQTPErrorBarsPolygons, JKQTPErrorBarsLines, JKQTPErrorSimpleBarsLines, JKQTPErrorSimpleBarsPolygons }; QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; for (int errorID=0; errorIDset_xColumn(columnX); @@ -33,7 +33,7 @@ First some data is added to the internal datastore (mostly, like explained in se // set error style, for the y-axis graph->set_yErrorStyle(errorStyles[errorID]); // no error indicators for the x-values - graph->set_xErrorStyle(JKQTPnoError); + graph->set_xErrorStyle(JKQTPNoError); // ... unless: for some error styles we want error in both directions if (showXandYError[errorID]) { graph->set_xErrorStyle(errorStyles[errorID]); @@ -50,7 +50,7 @@ First some data is added to the internal datastore (mostly, like explained in se // set symbol (cross/X) + pen style (and color)dashed) - graph->set_symbol(JKQTPcross); + graph->set_symbol(JKQTPCross); graph->set_style(Qt::DashLine); // set symbol size graph->set_symbolSize(5); @@ -60,9 +60,9 @@ First some data is added to the internal datastore (mostly, like explained in se graph->set_lineWidth(1); // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the - // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise + // result of JKQTPErrorPlotstyle2String(), because it contains underscores that would otherwise // lead to lower-case letter, which we don't want - graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); + graph->set_title("\\verb{"+JKQTPErrorPlotstyle2String(errorStyles[errorID])+"}"); // add the graph to the plot, so it is actually displayed plot.addGraph(graph); @@ -89,12 +89,12 @@ There are several variables that can be used to further style the error indicato graph->set_errorbarSize(15); ``` -There are more properties that you can find in the documentation of the mix-in classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors`, `JKQTPyGraphErrors`, `JKQTPgraphErrors`. +There are more properties that you can find in the documentation of the mix-in classes `JKQTPXYGraphErrors`, `JKQTPXGraphErrors`, `JKQTPYGraphErrors`, `JKQTPGraphErrors`. In addition the plot key is moved outside the pot and the grid in the plot is switched off: ```.cpp // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideRightTop); // ... and switch off the grid plot.get_xAxis()->set_drawGrid(false); plot.get_xAxis()->set_drawMinorGrid(false); @@ -106,10 +106,10 @@ The result looks like this: ![jkqtplotter_simpletest_errorbarstyles](../../screenshots/jkqtplotter_simpletest_errorbarstyles.png) -Error bars are implemented in the mixin-classes `JKQTPxyGraphErrors`, `JKQTPxGraphErrors` and `JKQTPyGraphErrors` that are all derived from `JKQTPgraphErrors`. With these it is simple to add error indicators to several different plot styles. Usually you can recognize these by looking at the class name, e.g. `JKQTPxyLineGraph` is a simple line+symbol graph, and `JKQTPxyLineErrorGraph` is the same with error indictaors (see above). There are also several other plots with error indicators: - - `JKQTPbarVerticalErrorGraph` for barcharts with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_barcharts.png) - - `JKQTPimpulsesVerticalGraph` for impulse/candle-stick charts with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_impulses.png) - - `JKQTPfilledCurveXErrorGraph` for filled curves with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_filledcurves.png) +Error bars are implemented in the mixin-classes `JKQTPXYGraphErrors`, `JKQTPXGraphErrors` and `JKQTPYGraphErrors` that are all derived from `JKQTPGraphErrors`. With these it is simple to add error indicators to several different plot styles. Usually you can recognize these by looking at the class name, e.g. `JKQTPXYLineGraph` is a simple line+symbol graph, and `JKQTPXYLineErrorGraph` is the same with error indictaors (see above). There are also several other plots with error indicators: + - `JKQTPBarVerticalErrorGraph` for barcharts with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_barcharts.png) + - `JKQTPImpulsesVerticalGraph` for impulse/candle-stick charts with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_impulses.png) + - `JKQTPFilledCurveXErrorGraph` for filled curves with errors:
![](../../screenshots/jkqtplotter_simpletest_errorbarstyles_filledcurves.png) . diff --git a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp index 89eca3d5f0..a5a5904c94 100644 --- a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_errorbarstyles.cpp - * Shows how to use different error indicator styles with JKQtPlotter + * Shows how to use different error indicator styles with JKQTPLotter * - * \ref JKQtPlotterErrorBarStyles + * \ref JKQTPLotterErrorBarStyles */ #include @@ -15,8 +15,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data a vector of x-values for a simple plot // and generate some values for varying errors @@ -41,7 +41,7 @@ int main(int argc, char* argv[]) // the array showXandYError indicates whether we want x- and y-error // for a style for all stywhere this is false, only y-error-indicators // are shown - QVector errorStyles {JKQTPnoError, JKQTPerrorBars, JKQTPerrorSimpleBars, JKQTPerrorLines, JKQTPerrorPolygons, JKQTPerrorBoxes, JKQTPerrorEllipses, JKQTPerrorBarsPolygons, JKQTPerrorBarsLines, JKQTPerrorSimpleBarsLines, JKQTPerrorSimpleBarsPolygons }; + QVector errorStyles {JKQTPNoError, JKQTPErrorBars, JKQTPErrorSimpleBars, JKQTPErrorLines, JKQTPErrorPolygons, JKQTPErrorBoxes, JKQTPErrorEllipses, JKQTPErrorBarsPolygons, JKQTPErrorBarsLines, JKQTPErrorSimpleBarsLines, JKQTPErrorSimpleBarsPolygons }; QVector showXandYError { false , true , true , false , false , true , true , false , false , false , false }; for (int errorID=0; errorID(errorID)*2.5; } - JKQTPxyLineErrorGraph* graph=new JKQTPxyLineErrorGraph(&plot); + JKQTPXYLineErrorGraph* graph=new JKQTPXYLineErrorGraph(&plot); // copy data into datastore and immediately set the yColumn graph->set_xColumn(columnX); @@ -62,7 +62,7 @@ int main(int argc, char* argv[]) // set error style, for the y-axis graph->set_yErrorStyle(errorStyles[errorID]); // no error indicators for the x-values - graph->set_xErrorStyle(JKQTPnoError); + graph->set_xErrorStyle(JKQTPNoError); // ... unless: for some error styles we want error in both directions if (showXandYError[errorID]) { graph->set_xErrorStyle(errorStyles[errorID]); @@ -79,7 +79,7 @@ int main(int argc, char* argv[]) // set symbol (cross/X) + pen style (and color)dashed) - graph->set_symbol(JKQTPcross); + graph->set_symbol(JKQTPCross); graph->set_style(Qt::DashLine); // set symbol size graph->set_symbolSize(5); @@ -89,9 +89,9 @@ int main(int argc, char* argv[]) graph->set_lineWidth(1); // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the - // result of JKQTPerrorPlotstyle2String(), because it contains underscores that would otherwise + // result of JKQTPErrorPlotstyle2String(), because it contains underscores that would otherwise // lead to lower-case letter, which we don't want - graph->set_title("\\verb{"+JKQTPerrorPlotstyle2String(errorStyles[errorID])+"}"); + graph->set_title("\\verb{"+JKQTPErrorPlotstyle2String(errorStyles[errorID])+"}"); // add the graph to the plot, so it is actually displayed plot.addGraph(graph); @@ -101,7 +101,7 @@ int main(int argc, char* argv[]) plot.zoomToFit(); // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideRightTop); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideRightTop); // ... and switch off the grid plot.get_xAxis()->set_drawGrid(false); plot.get_xAxis()->set_drawMinorGrid(false); diff --git a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro index 8940125c1a..6f2e96184a 100644 --- a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_errorbarstyles -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_filledgraphs/README.md b/examples/simpletest_filledgraphs/README.md index 08b028af82..634574d372 100644 --- a/examples/simpletest_filledgraphs/README.md +++ b/examples/simpletest_filledgraphs/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Filled Curve Plots {#JKQtPlotterFilledGraphs} -This project (see `./examples/simpletest_filledgraphs/`) simply creates a JKQtPlotter widget (as a new window) and adds several filled curve graphs (Histograms). Data is initialized from QVector objects. +# Example (JKQTPLotter): Filled Curve Plots {#JKQTPLotterFilledGraphs} +This project (see `./examples/simpletest_filledgraphs/`) simply creates a JKQTPLotter widget (as a new window) and adds several filled curve graphs (Histograms). Data is initialized from QVector objects. The source code of the main application can be found in [`jkqtplotter_simpletest_filledgraphs.cpp`](../simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp). @@ -15,12 +15,12 @@ And three columns with 256 entries each, which will be filled with the R-, G- an size_t columnB=ds->addColumn(256, "historam_B"); ``` -In this example we will access the data in the internal datastore directly. This access is possible through objects of type JKQTPcolumn, which is a proxy to the data in one of the columns in a `JKQTdatastore`: +In this example we will access the data in the internal datastore directly. This access is possible through objects of type JKQTPColumn, which is a proxy to the data in one of the columns in a `JKQTdatastore`: ```.cpp - JKQTPcolumn cG=ds->getColumn(columnG); - JKQTPcolumn cR=ds->getColumn(columnR); - JKQTPcolumn cB=ds->getColumn(columnB); + JKQTPColumn cG=ds->getColumn(columnG); + JKQTPColumn cR=ds->getColumn(columnR); + JKQTPColumn cB=ds->getColumn(columnB); ``` In order to calculate the histograms, first all enries in the columns are set to 0: @@ -48,10 +48,10 @@ Finally the histogram is calculated: cB.scale(100.0/static_cast(image.width()*image.height())); ``` -Finally three `JKQTPfilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only): +Finally three `JKQTPFilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only): ```.cpp - JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); + JKQTPFilledCurveXGraph* graphR=new JKQTPFilledCurveXGraph(&plot); // set graph titles graphR->set_title("R-channel"); @@ -75,7 +75,7 @@ The result looks like this: ![jkqtplotter_simpletest_filledgraphs](../../screenshots/jkqtplotter_simpletest_filledgraphs.png) -If you use `JKQTPfilledCurveYGraph` instead of `JKQTPfilledCurveXGraph`, the curve will not be filled until the y=0-axis, but until the x=0-axis. Of course you will also have to swap the x- and y-data columns. The result will look like this: +If you use `JKQTPFilledCurveYGraph` instead of `JKQTPFilledCurveXGraph`, the curve will not be filled until the y=0-axis, but until the x=0-axis. Of course you will also have to swap the x- and y-data columns. The result will look like this: ![jkqtplotter_simpletest_filledgraphs_yaxis](../../screenshots/jkqtplotter_simpletest_filledgraphs_yaxis.png) diff --git a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp index e9da25fa5d..1d14d9b567 100644 --- a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_filledgraphs.cpp - * Shows how to use filled graphs with JKQtPlotter + * Shows how to use filled graphs with JKQTPLotter * - * \ref JKQtPlotterFilledGraphs + * \ref JKQTPLotterFilledGraphs */ #include @@ -13,8 +13,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create 4 datacolumns with length 256 entries in the datastore // these will later hold the RGB-histogram and a linear x-values vector @@ -25,11 +25,11 @@ int main(int argc, char* argv[]) size_t columnR=ds->addColumn(256, "historam_R"); size_t columnG=ds->addColumn(256, "historam_G"); size_t columnB=ds->addColumn(256, "historam_B"); - // - in addition JKQTPcolumn objects are generated, which can be used to access + // - in addition JKQTPColumn objects are generated, which can be used to access // the data in the columns - JKQTPcolumn cG=ds->getColumn(columnG); - JKQTPcolumn cR=ds->getColumn(columnR); - JKQTPcolumn cB=ds->getColumn(columnB); + JKQTPColumn cG=ds->getColumn(columnG); + JKQTPColumn cR=ds->getColumn(columnR); + JKQTPColumn cB=ds->getColumn(columnB); // - now all columns for RGB are initialized to 0 cR.setAll(0); cG.setAll(0); @@ -53,9 +53,9 @@ int main(int argc, char* argv[]) // 4. now we add three semi-transparent, filled curve plots, one for each histogram - JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot); - JKQTPfilledCurveXGraph* graphG=new JKQTPfilledCurveXGraph(&plot); - JKQTPfilledCurveXGraph* graphB=new JKQTPfilledCurveXGraph(&plot); + JKQTPFilledCurveXGraph* graphR=new JKQTPFilledCurveXGraph(&plot); + JKQTPFilledCurveXGraph* graphG=new JKQTPFilledCurveXGraph(&plot); + JKQTPFilledCurveXGraph* graphB=new JKQTPFilledCurveXGraph(&plot); // set graph titles graphR->set_title("R-channel"); diff --git a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro index e8f8e406a5..e1001f367f 100644 --- a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.pro @@ -12,7 +12,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_filledgraphs -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_functionplot/README.md b/examples/simpletest_functionplot/README.md index 5282c820c6..020e8e58c6 100644 --- a/examples/simpletest_functionplot/README.md +++ b/examples/simpletest_functionplot/README.md @@ -1,11 +1,11 @@ -# Example (JKQtPlotter): Plotting Mathematical Functions as Line Graphs {#JKQtPlotterFunctionPlots} +# Example (JKQTPLotter): Plotting Mathematical Functions as Line Graphs {#JKQTPLotterFunctionPlots} ## Basics -This project (see `./examples/simpletest_functionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions may be defined as static C functions, C++ functors or c++ inline functions. See [test/simpletest_parsedfunctionplot](../simpletest_parsedfunctionplot) for an example of how to use an internal equation parser provided with JKQtPlotter instead of directly defining functions. +This project (see `./examples/simpletest_functionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions may be defined as static C functions, C++ functors or c++ inline functions. See [test/simpletest_parsedfunctionplot](../simpletest_parsedfunctionplot) for an example of how to use an internal equation parser provided with JKQTPLotter instead of directly defining functions. ## Simple C++ inline function The first example shows how to plot a C++ inline function: ```.cpp - JKQTPxFunctionLineGraph* func1=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func1=new JKQTPXFunctionLineGraph(plot); func1->set_plotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); func1->set_title("C++-inline function $0.2x^2-0.015x^3$"); plot->addGraph(func1); @@ -14,7 +14,7 @@ The first example shows how to plot a C++ inline function: ## Simple C++ inline function with parameters In any such plot function, you can also use parameters, provided via the second parameter. Usually these are "internal parameters", defined by `func2->set_paramsV(p0, p1, ...)`: ```.cpp - JKQTPxFunctionLineGraph* func2=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func2=new JKQTPXFunctionLineGraph(plot); func2->set_plotFunction([](double x, void* params) { QVector* p=static_cast*>(params); return p->at(0)*sin(2.0*M_PI*x*p->at(1)); @@ -27,7 +27,7 @@ In any such plot function, you can also use parameters, provided via the second ... but generally any pointer can be used as parameter (the set by `set_parameter(static_cast(myDataObject))`): ```.cpp - JKQTPxFunctionLineGraph* func3=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func3=new JKQTPXFunctionLineGraph(plot); func3->set_plotFunction([](double x, void* params) { QMap* p=static_cast*>(params); return p->value("amplitude")*sin(2.0*M_PI*x*p->value("frequency")); @@ -56,7 +56,7 @@ You can also use C++ functors (or function objects): // ... - JKQTPxFunctionLineGraph* func4=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func4=new JKQTPXFunctionLineGraph(plot); func4->set_plotFunction(SincSqr(-8)); func4->set_title("C++ functor $-8*\\sin^2(x)/x^2$"); plot->addGraph(func4); @@ -71,17 +71,17 @@ You can also plot simple static C functions: // ... - JKQTPxFunctionLineGraph* func5=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func5=new JKQTPXFunctionLineGraph(plot); func5->set_plotFunction(&sinc); func5->set_title("static C function $10*\\sin(x)/x$"); plot->addGraph(func5); ``` ## Predefined "special" functions -Finally `JKQTPxFunctionLineGraph` provides a small set of special functions (polynomial `p0+p1*x+p2*x^2+...`, exponential `p0+p1*exp(x/p2)`, power-law `p0+p1*x^p2`, ...), which are parametrized from the internal or external parameters: +Finally `JKQTPXFunctionLineGraph` provides a small set of special functions (polynomial `p0+p1*x+p2*x^2+...`, exponential `p0+p1*exp(x/p2)`, power-law `p0+p1*x^p2`, ...), which are parametrized from the internal or external parameters: ```.cpp - JKQTPxFunctionLineGraph* func6=new JKQTPxFunctionLineGraph(plot); - func6->setSpecialFunction(JKQTPxFunctionLineGraph::Line); + JKQTPXFunctionLineGraph* func6=new JKQTPXFunctionLineGraph(plot); + func6->setSpecialFunction(JKQTPXFunctionLineGraph::Line); // here we set offset p0=-1 and slope p1=1.5 of the line p0+p1*x func6->set_paramsV(-1,1.5); func6->set_title("special function: linear"); @@ -90,8 +90,8 @@ Finally `JKQTPxFunctionLineGraph` provides a small set of special functions (pol To demonstrate how to use parameters from a datastore column, have a look at the next example. It is derived from the special-function plot above, but adds a line with a different offset and slope and reads the parameters from a datastore column `paramCol`, which is initialized from the vector `params`: ```.cpp -JKQTPxFunctionLineGraph* func7=new JKQTPxFunctionLineGraph(plot); - func7->setSpecialFunction(JKQTPxFunctionLineGraph::Line); +JKQTPXFunctionLineGraph* func7=new JKQTPXFunctionLineGraph(plot); + func7->setSpecialFunction(JKQTPXFunctionLineGraph::Line); // here we set offset p0=1 and slope p1=-1.5 of the line p0+p1*x by adding these into a column // in the internal datastore and then set that column as parameterColumn for the function graph QVector params; @@ -110,9 +110,9 @@ This code snippets above result in a plot like this: ## Notes Note that all the different variants to provide parameters can be used with all types of functions! -Also see the example [Plotting Parsed Mathematical Functions as Line Graphs](../simpletest_parsedfunctionplot) for details on how the actual plotting algorithm works. That example also shows how to define a function as a string, which is then parsed and evaluated by an expression parser library embedded in JKQtPlotter. +Also see the example [Plotting Parsed Mathematical Functions as Line Graphs](../simpletest_parsedfunctionplot) for details on how the actual plotting algorithm works. That example also shows how to define a function as a string, which is then parsed and evaluated by an expression parser library embedded in JKQTPLotter. -All examples above use the graph class `JKQTPxFunctionLineGraph`, which plots a function `y=f(x)`. If you want to plot a function `x=f(y)`, you can use the class `JKQTPyFunctionLineGraph` instead. If in the examples above, we exchange all `JKQTPxFunctionLineGraph` for `JKQTPyFunctionLineGraph`, the graphs will be rotated by 90 degree, as all functions are interpreted as `x=f(y)`: +All examples above use the graph class `JKQTPXFunctionLineGraph`, which plots a function `y=f(x)`. If you want to plot a function `x=f(y)`, you can use the class `JKQTPYFunctionLineGraph` instead. If in the examples above, we exchange all `JKQTPXFunctionLineGraph` for `JKQTPYFunctionLineGraph`, the graphs will be rotated by 90 degree, as all functions are interpreted as `x=f(y)`: ![jkqtplotter_simpletest_functionplot_fy](../../screenshots/jkqtplotter_simpletest_functionplot_fy.png) diff --git a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp index 7b03747eec..9cde2ba472 100644 --- a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp +++ b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_functionplot.cpp - * Shows how to plot Mathematical Functions as Line Graphs with JKQtPlotter (as evaluated C/C++ functions) + * Shows how to plot Mathematical Functions as Line Graphs with JKQTPLotter (as evaluated C/C++ functions) * - * \ref JKQtPlotterFunctionPlots + * \ref JKQTPLotterFunctionPlots */ #include @@ -29,24 +29,24 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a window that conatins a line-edit to edit a function - // and a JKQtPlotter to display the function, combine everything in a layout + // and a JKQTPLotter to display the function, combine everything in a layout QWidget mainWin; - JKQtPlotter* plot=new JKQtPlotter(&mainWin); + JKQTPLotter* plot=new JKQTPLotter(&mainWin); QVBoxLayout* layout=new QVBoxLayout; mainWin.setLayout(layout); layout->addWidget(plot); - // 2. now we add a JKQTPxFunctionLineGraph object, which will draw a simple function + // 2. now we add a JKQTPXFunctionLineGraph object, which will draw a simple function // the function is defined as C++ inline function - JKQTPxFunctionLineGraph* func1=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func1=new JKQTPXFunctionLineGraph(plot); func1->set_plotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); func1->set_title("C++-inline function $0.2x^2-0.015x^3$"); plot->addGraph(func1); - // 3. now we add a JKQTPxFunctionLineGraph object, which will draw a simple function + // 3. now we add a JKQTPXFunctionLineGraph object, which will draw a simple function // the function is again defined as C++ inline function, but now uses internal // parameters (handed over to the function as a pointer to QVector - JKQTPxFunctionLineGraph* func2=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func2=new JKQTPXFunctionLineGraph(plot); func2->set_plotFunction([](double x, void* params) { QVector* p=static_cast*>(params); return p->at(0)*sin(2.0*M_PI*x*p->at(1)); @@ -56,10 +56,10 @@ int main(int argc, char* argv[]) func2->set_title("C++-inline function with int. params $p_0\\cdot\\sin(x*2.0*\\pi\\cdot p_1)$"); plot->addGraph(func2); - // 4. now we add a JKQTPxFunctionLineGraph object, which will draw a simple function + // 4. now we add a JKQTPXFunctionLineGraph object, which will draw a simple function // the function is again defined as C++ inline function, but now uses external // parameters, which may have any type (here QMapset_plotFunction([](double x, void* params) { QMap* p=static_cast*>(params); return p->value("amplitude")*sin(2.0*M_PI*x*p->value("frequency")); @@ -73,29 +73,29 @@ int main(int argc, char* argv[]) plot->addGraph(func3); // 5. of course the function may also be any C+ funtor object: - JKQTPxFunctionLineGraph* func4=new JKQTPxFunctionLineGraph(plot); + JKQTPXFunctionLineGraph* func4=new JKQTPXFunctionLineGraph(plot); func4->set_plotFunction(SincSqr(-8)); func4->set_title("C++ functor $-8*\\sin^2(x)/x^2$"); plot->addGraph(func4); - // 6. now we use a JKQTPxFunctionLineGraph to draw a static C function - JKQTPxFunctionLineGraph* func5=new JKQTPxFunctionLineGraph(plot); + // 6. now we use a JKQTPXFunctionLineGraph to draw a static C function + JKQTPXFunctionLineGraph* func5=new JKQTPXFunctionLineGraph(plot); func5->set_plotFunction(&sinc); func5->set_title("static C function $10*\\sin(x)/x$"); plot->addGraph(func5); - // 7. finally JKQTPxFunctionLineGraph defines a small set of common functions - JKQTPxFunctionLineGraph* func6=new JKQTPxFunctionLineGraph(plot); - func6->setSpecialFunction(JKQTPxFunctionLineGraph::Line); + // 7. finally JKQTPXFunctionLineGraph defines a small set of common functions + JKQTPXFunctionLineGraph* func6=new JKQTPXFunctionLineGraph(plot); + func6->setSpecialFunction(JKQTPXFunctionLineGraph::Line); // here we set offset p0=-1 and slope p1=1.5 of the line p0+p1*x func6->set_paramsV(-1,1.5); func6->set_title("special function: linear p_0=-1, p_1=1.5"); plot->addGraph(func6); - // 7. finally JKQTPxFunctionLineGraph defines a small set of common functions - JKQTPxFunctionLineGraph* func7=new JKQTPxFunctionLineGraph(plot); - func7->setSpecialFunction(JKQTPxFunctionLineGraph::Line); + // 7. finally JKQTPXFunctionLineGraph defines a small set of common functions + JKQTPXFunctionLineGraph* func7=new JKQTPXFunctionLineGraph(plot); + func7->setSpecialFunction(JKQTPXFunctionLineGraph::Line); // here we set offset p0=1 and slope p1=-1.5 of the line p0+p1*x by adding these into a column // in the internal datastore and then set that column as parameterColumn for the function graph QVector params; @@ -109,7 +109,7 @@ int main(int argc, char* argv[]) // 8. set some axis properties (we use LaTeX for nice equation rendering) plot->get_xAxis()->set_axisLabel(QObject::tr("x-axis")); plot->get_yAxis()->set_axisLabel(QObject::tr("y-axis")); - plot->get_plotter()->set_keyPosition(JKQTPkeyOutsideBottomLeft); + plot->get_plotter()->set_keyPosition(JKQTPKeyOutsideBottomLeft); // 4. scale the plot so the graph is contained diff --git a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro index c893359377..40b06f4112 100644 --- a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro +++ b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_functionplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_geometric/README.md b/examples/simpletest_geometric/README.md index 6ce09f99ea..ae273f90c7 100644 --- a/examples/simpletest_geometric/README.md +++ b/examples/simpletest_geometric/README.md @@ -1,23 +1,23 @@ -# Example (JKQtPlotter): Plotting Geometric Objects {#JKQtPlotterGeometricGraphs} -This project (see `./test/simpletest_geometric/`) shows the capabilities of JKQtPlotter to also draw geometric elements, like circles, ellipses, rectangles etc. +# Example (JKQTPLotter): Plotting Geometric Objects {#JKQTPLotterGeometricGraphs} +This project (see `./test/simpletest_geometric/`) shows the capabilities of JKQTPLotter to also draw geometric elements, like circles, ellipses, rectangles etc. The source code of the main application can be found in [`jkqtplotter_simpletest_geometric.cpp`](../simpletest_geometric/jkqtplotter_simpletest_geometric.cpp). First a plot is generated and the axis aspect ration is set to 1, so an accurate plot is generated. Then several geometric graphs are added to the plot. Here are some examples, you can find more more examples in the source code of the example: ```.cpp // a text element - plot.addGraph(new JKQTPgeoText(&plot, 0.1,0.6, "$x_{1/2}=\\frac{\\sqrt{b^2-4ac}}{2a}$", 10, QColor("red"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,0.6, "$x_{1/2}=\\frac{\\sqrt{b^2-4ac}}{2a}$", 10, QColor("red"))); // a single symbol - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.1,0.6, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.1,0.6, JKQTPCircle, 5, QColor("grey"))); // a line - plot.addGraph(new JKQTPgeoLine(&plot, 1, 0.05, 1.9, 0.9, QColor("red"), 2)); + plot.addGraph(new JKQTPGeoLine(&plot, 1, 0.05, 1.9, 0.9, QColor("red"), 2)); // a one-sided infinite line with slope dy/dx=0.25/0.2 - JKQTPgeoInfiniteLine* infLine=new JKQTPgeoInfiniteLine(&plot, 1.7, 0.2, 0.2, 0.25, QColor("green"), 1.5, Qt::PenStyle::DashLine); + JKQTPGeoInfiniteLine* infLine=new JKQTPGeoInfiniteLine(&plot, 1.7, 0.2, 0.2, 0.25, QColor("green"), 1.5, Qt::PenStyle::DashLine); infLine->set_two_sided(false); infLine->setAlpha(0.5); plot.addGraph(infLine); @@ -26,23 +26,23 @@ The source code of the main application can be found in [`jkqtplotter_simpletes // a polyline QVector p; p<appendPoint(2.1, 0.5); polygraph->appendPoint(2.9, 0.9); polygraph->appendPoint(2.2, 0.8); @@ -53,15 +53,15 @@ The source code of the main application can be found in [`jkqtplotter_simpletes // an arc from an ellipse from -10 degrees to 117 degrees, centered at 2.5,1.5 and full axes of 0.5 and 0.5 - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.5,0.5, -10, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.5,0.5, -10, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine)); // a pie centered at 2.5,2.5 with ellipse axes 0.9 and 0.9 and from angle 0 degrees to 90 degrees - plot.addGraph(new JKQTPgeoPie(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); + plot.addGraph(new JKQTPGeoPie(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); // a chord centered at 2.5,2.5 with ellipse axes 0.9 and 0.9 and from angle 0 degrees to 90 degrees - plot.addGraph(new JKQTPgeoChord(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); + plot.addGraph(new JKQTPGeoChord(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); ``` diff --git a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp index a7aadab7b1..bf0aeb2047 100644 --- a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp +++ b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_geometric.cpp - * Shows how to plot several geometric forms with JKQtPlotter + * Shows how to plot several geometric forms with JKQTPLotter * - * \ref JKQtPlotterGeometricGraphs + * \ref JKQTPLotterGeometricGraphs */ #include @@ -14,7 +14,7 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window - JKQtPlotter plot; + JKQTPLotter plot; // 2. format graph: // 2.1 set the graph scales manually @@ -31,75 +31,75 @@ int main(int argc, char* argv[]) // 3. add some geometric plots // 3.1 some text elements, also with formatting by LaTeX expressions - plot.addGraph(new JKQTPgeoText(&plot, 0.1,0.95, "\\textbf{Text:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoText(&plot, 0.1,0.1, "A text object in 10pt", 10, QColor("red"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.1,0.1, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoText(&plot, 0.1,0.3, "A text object in 12pt", 12, QColor("red"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.1,0.3, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoText(&plot, 0.1,0.6, "$x_{1/2}=\\frac{\\sqrt{b^2-4ac}}{2a}$", 10, QColor("red"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.1,0.6, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,0.95, "\\textbf{Text:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,0.1, "A text object in 10pt", 10, QColor("red"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.1,0.1, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,0.3, "A text object in 12pt", 12, QColor("red"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.1,0.3, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,0.6, "$x_{1/2}=\\frac{\\sqrt{b^2-4ac}}{2a}$", 10, QColor("red"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.1,0.6, JKQTPCircle, 5, QColor("grey"))); // 3.2 some lines elements (single lines and polylines) - plot.addGraph(new JKQTPgeoText(&plot, 1.1,0.95, "\\textbf{Lines:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoLine(&plot, 1, 0.05, 1.9, 0.9, QColor("red"), 2)); - plot.addGraph(new JKQTPgeoLine(&plot, 1, 0.1, 1.9, 0.8, QColor("blue"), 1, Qt::PenStyle::DashLine)); + plot.addGraph(new JKQTPGeoText(&plot, 1.1,0.95, "\\textbf{Lines:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoLine(&plot, 1, 0.05, 1.9, 0.9, QColor("red"), 2)); + plot.addGraph(new JKQTPGeoLine(&plot, 1, 0.1, 1.9, 0.8, QColor("blue"), 1, Qt::PenStyle::DashLine)); QVector p; p<set_two_sided(false); infLine->setAlpha(0.5); plot.addGraph(infLine); - infLine=new JKQTPgeoInfiniteLine(&plot, 1.7, 0.2, 0.2, -0.15, QColor("blue"), 1.5, Qt::PenStyle::SolidLine); + infLine=new JKQTPGeoInfiniteLine(&plot, 1.7, 0.2, 0.2, -0.15, QColor("blue"), 1.5, Qt::PenStyle::SolidLine); infLine->set_two_sided(true); infLine->setAlpha(0.5); plot.addGraph(infLine); // 3.3 some rectangles (you give the center and width/height of the rectangle in the contructor) - plot.addGraph(new JKQTPgeoText(&plot, 0.1,1.95, "\\textbf{Rectangles:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoRectangle(&plot, 0.5,1.5,0.8,0.8, QColor("blue"), 1, Qt::SolidLine, QColor("lightblue"))); + plot.addGraph(new JKQTPGeoText(&plot, 0.1,1.95, "\\textbf{Rectangles:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoRectangle(&plot, 0.5,1.5,0.8,0.8, QColor("blue"), 1, Qt::SolidLine, QColor("lightblue"))); QColor rfill("lightblue"); rfill.setAlphaF(0.5); - plot.addGraph(new JKQTPgeoRectangle(&plot, QPointF(0.4,1.3), QPointF(0.9,1.6), QColor("blue"), 1, Qt::SolidLine, rfill)); - plot.addGraph(new JKQTPgeoRectangle(&plot, 0.5,1.5,0.8,0.5, 35, QColor("darkblue"), 2, Qt::DashLine)); - plot.addGraph(new JKQTPgeoRectangle(&plot, 0.5,1.5,0.6,0.6, -7, QColor("orange"), 2, Qt::DotLine, QColor("salmon"), Qt::FDiagPattern)); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.5,1.5, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.4,1.3, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 0.9,1.6, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoRectangle(&plot, QPointF(0.4,1.3), QPointF(0.9,1.6), QColor("blue"), 1, Qt::SolidLine, rfill)); + plot.addGraph(new JKQTPGeoRectangle(&plot, 0.5,1.5,0.8,0.5, 35, QColor("darkblue"), 2, Qt::DashLine)); + plot.addGraph(new JKQTPGeoRectangle(&plot, 0.5,1.5,0.6,0.6, -7, QColor("orange"), 2, Qt::DotLine, QColor("salmon"), Qt::FDiagPattern)); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.5,1.5, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.4,1.3, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 0.9,1.6, JKQTPCircle, 5, QColor("grey"))); // 3.4 some circles and elllipses - plot.addGraph(new JKQTPgeoText(&plot, 1.1,1.95, "\\textbf{Circles/Ellipses:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoText(&plot, 1.1,1.95, "\\textbf{Circles/Ellipses:}", 14, QColor("red"))); QColor col=QColor("blue"); col.setAlphaF(0.2); - plot.addGraph(new JKQTPgeoRectangle(&plot, 1.5,1.5,0.8,0.8, col, 0.5, Qt::SolidLine)); + plot.addGraph(new JKQTPGeoRectangle(&plot, 1.5,1.5,0.8,0.8, col, 0.5, Qt::SolidLine)); col.setAlphaF(1); - plot.addGraph(new JKQTPgeoEllipse(&plot, 1.5,1.5,0.8,0.8, col, 1, Qt::SolidLine, QColor("lightblue"))); + plot.addGraph(new JKQTPGeoEllipse(&plot, 1.5,1.5,0.8,0.8, col, 1, Qt::SolidLine, QColor("lightblue"))); col=QColor("blue"); col.setAlphaF(0.2); - plot.addGraph(new JKQTPgeoRectangle(&plot, QPointF(1.4,1.3), QPointF(1.9,1.6),col, 0.5, Qt::SolidLine)); + plot.addGraph(new JKQTPGeoRectangle(&plot, QPointF(1.4,1.3), QPointF(1.9,1.6),col, 0.5, Qt::SolidLine)); col.setAlphaF(1); - plot.addGraph(new JKQTPgeoEllipse(&plot, QPointF(1.4,1.3), QPointF(1.9,1.6), col, 1, Qt::SolidLine, rfill)); + plot.addGraph(new JKQTPGeoEllipse(&plot, QPointF(1.4,1.3), QPointF(1.9,1.6), col, 1, Qt::SolidLine, rfill)); col=QColor("darkblue"); col.setAlphaF(0.2); - plot.addGraph(new JKQTPgeoRectangle(&plot, 1.5,1.5,0.8,0.5, 35, col, 0.5, Qt::DashLine)); + plot.addGraph(new JKQTPGeoRectangle(&plot, 1.5,1.5,0.8,0.5, 35, col, 0.5, Qt::DashLine)); col.setAlphaF(1); - plot.addGraph(new JKQTPgeoEllipse(&plot, 1.5,1.5,0.8,0.5, 35, col, 2, Qt::DashLine)); + plot.addGraph(new JKQTPGeoEllipse(&plot, 1.5,1.5,0.8,0.5, 35, col, 2, Qt::DashLine)); col=QColor("orange"); col.setAlphaF(0.2); - plot.addGraph(new JKQTPgeoRectangle(&plot, 1.5,1.5,0.6,0.6, -7, col, 0.5, Qt::DotLine)); + plot.addGraph(new JKQTPGeoRectangle(&plot, 1.5,1.5,0.6,0.6, -7, col, 0.5, Qt::DotLine)); col.setAlphaF(1); - plot.addGraph(new JKQTPgeoEllipse(&plot, 1.5,1.5,0.6,0.6, -7, col, 2, Qt::DotLine, QColor("salmon"), Qt::FDiagPattern)); - plot.addGraph(new JKQTPgeoSymbol(&plot, 1.5,1.5, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 1.4,1.3, JKQTPcircle, 5, QColor("grey"))); - plot.addGraph(new JKQTPgeoSymbol(&plot, 1.9,1.6, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoEllipse(&plot, 1.5,1.5,0.6,0.6, -7, col, 2, Qt::DotLine, QColor("salmon"), Qt::FDiagPattern)); + plot.addGraph(new JKQTPGeoSymbol(&plot, 1.5,1.5, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 1.4,1.3, JKQTPCircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 1.9,1.6, JKQTPCircle, 5, QColor("grey"))); // 3.5 some polygon elements - plot.addGraph(new JKQTPgeoText(&plot, 2.1,0.95, "\\textbf{PolyLines/Polygons:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoText(&plot, 2.1,0.95, "\\textbf{PolyLines/Polygons:}", 14, QColor("red"))); QVector polygon; polygon<setAlpha(0.75); plot.addGraph(polygraph); - polygraph=new JKQTPgeoPolygon(&plot, QColor("red"), 2, Qt::PenStyle::DashLine, QColor("salmon")); + polygraph=new JKQTPGeoPolygon(&plot, QColor("red"), 2, Qt::PenStyle::DashLine, QColor("salmon")); polygraph->appendPoint(2.1, 0.5); polygraph->appendPoint(2.9, 0.9); polygraph->appendPoint(2.2, 0.8); @@ -110,43 +110,43 @@ int main(int argc, char* argv[]) // 3.6 some arcs - plot.addGraph(new JKQTPgeoText(&plot, 2.1,1.95, "\\textbf{Arcs:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoRectangle(&plot, 2.5,1.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.8,0.8, 90,180 , QColor("red"), 4, Qt::PenStyle::SolidLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.6,0.6, 270,360 , QColor("maroon"), 4, Qt::PenStyle::DashDotLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.5,0.5, -10, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine)); - plot.addGraph(new JKQTPgeoArc(&plot,2.5,1.5,0.4,0.4, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine)); - plot.addGraph(new JKQTPgeoSymbol(&plot, 2.5,1.5, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoText(&plot, 2.1,1.95, "\\textbf{Arcs:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoRectangle(&plot, 2.5,1.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.8,0.8, 90,180 , QColor("red"), 4, Qt::PenStyle::SolidLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.6,0.6, 270,360 , QColor("maroon"), 4, Qt::PenStyle::DashDotLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.5,0.5, -10, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine)); + plot.addGraph(new JKQTPGeoArc(&plot,2.5,1.5,0.4,0.4, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine)); + plot.addGraph(new JKQTPGeoSymbol(&plot, 2.5,1.5, JKQTPCircle, 5, QColor("grey"))); // 3.7 some pies - plot.addGraph(new JKQTPgeoText(&plot, 2.1,2.95, "\\textbf{Pies:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoRectangle(&plot, 2.5,2.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); - JKQTPgeoPie* pie; - plot.addGraph(pie=new JKQTPgeoPie(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); - plot.addGraph(pie=new JKQTPgeoPie(&plot,2.5,2.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine,QColor("blue"))); + plot.addGraph(new JKQTPGeoText(&plot, 2.1,2.95, "\\textbf{Pies:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoRectangle(&plot, 2.5,2.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); + JKQTPGeoPie* pie; + plot.addGraph(pie=new JKQTPGeoPie(&plot,2.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); + plot.addGraph(pie=new JKQTPGeoPie(&plot,2.5,2.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine,QColor("blue"))); pie->setAlpha(0.5); - plot.addGraph(pie=new JKQTPgeoPie(&plot,2.5,2.5,0.5,0.3, -25, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine,QColor("red"))); + plot.addGraph(pie=new JKQTPGeoPie(&plot,2.5,2.5,0.5,0.3, -25, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine,QColor("red"))); pie->setAlpha(0.5); - plot.addGraph(pie=new JKQTPgeoPie(&plot,2.5,2.5,0.25,0.8, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine,QColor("green"))); + plot.addGraph(pie=new JKQTPGeoPie(&plot,2.5,2.5,0.25,0.8, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine,QColor("green"))); pie->setAlpha(0.5); - plot.addGraph(new JKQTPgeoSymbol(&plot, 2.5,2.5, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 2.5,2.5, JKQTPCircle, 5, QColor("grey"))); // 3.8 some chords - plot.addGraph(new JKQTPgeoText(&plot, 1.1,2.95, "\\textbf{Chords:}", 14, QColor("red"))); - plot.addGraph(new JKQTPgeoRectangle(&plot, 1.5,2.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); - JKQTPgeoChord* chord; - plot.addGraph(chord=new JKQTPgeoChord(&plot,1.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); - plot.addGraph(chord=new JKQTPgeoChord(&plot,1.5,2.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine,QColor("blue"))); + plot.addGraph(new JKQTPGeoText(&plot, 1.1,2.95, "\\textbf{Chords:}", 14, QColor("red"))); + plot.addGraph(new JKQTPGeoRectangle(&plot, 1.5,2.5,0.9,0.9, QColor("lightgrey"), 0.5, Qt::SolidLine)); + JKQTPGeoChord* chord; + plot.addGraph(chord=new JKQTPGeoChord(&plot,1.5,2.5,0.9,0.9, 0, 90 , QColor("blue"), 4, Qt::PenStyle::SolidLine,QColor("lightblue"))); + plot.addGraph(chord=new JKQTPGeoChord(&plot,1.5,2.5,0.7,0.7, 180,270 , QColor("darkblue"), 4, Qt::PenStyle::SolidLine,QColor("blue"))); chord->setAlpha(0.5); - plot.addGraph(chord=new JKQTPgeoChord(&plot,1.5,2.5,0.5,0.3, -25, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine,QColor("red"))); + plot.addGraph(chord=new JKQTPGeoChord(&plot,1.5,2.5,0.5,0.3, -25, 117 , QColor("orange"), 4, Qt::PenStyle::DashLine,QColor("red"))); chord->setAlpha(0.5); - plot.addGraph(chord=new JKQTPgeoChord(&plot,1.5,2.5,0.25,0.8, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine,QColor("green"))); + plot.addGraph(chord=new JKQTPGeoChord(&plot,1.5,2.5,0.25,0.8, 85, 347 , QColor("darkgreen"), 4, Qt::PenStyle::SolidLine,QColor("green"))); chord->setAlpha(0.5); - plot.addGraph(new JKQTPgeoSymbol(&plot, 1.5,2.5, JKQTPcircle, 5, QColor("grey"))); + plot.addGraph(new JKQTPGeoSymbol(&plot, 1.5,2.5, JKQTPCircle, 5, QColor("grey"))); // 4. show plotter and make it a decent size diff --git a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.pro b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.pro index 456671da53..e2ee5d51c8 100644 --- a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.pro +++ b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_geometric -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_imageplot/README.md b/examples/simpletest_imageplot/README.md index 3972d37727..de362d6447 100644 --- a/examples/simpletest_imageplot/README.md +++ b/examples/simpletest_imageplot/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple math image plot {#JKQtPlotterImagePlot} -This project (see `./examples/simpletest_imageplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). This very simple interface can also be used to interface with many common image processing libraries, like CImg or OpenCV. +# Example (JKQTPLotter): Simple math image plot {#JKQTPLotterImagePlot} +This project (see `./examples/simpletest_imageplot/`) simply creates a JKQTPLotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). This very simple interface can also be used to interface with many common image processing libraries, like CImg or OpenCV. The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot.cpp`](../simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp): ```.cpp @@ -17,12 +17,12 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=100; // image dimension in x-direction [pixels] @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of C-array airydisk is copied into a column // of the datastore in row-major order size_t cAiryDisk=ds->addCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); diff --git a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp index c1d493a6ee..49d815a846 100644 --- a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_imageplot.cpp - * Shows how to plot colored math images/matrices with JKQtPlotter + * Shows how to plot colored math images/matrices with JKQTPLotter * - * \ref JKQtPlotterImagePlot + * \ref JKQTPLotterImagePlot */ #include @@ -18,12 +18,12 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=100; // image dimension in x-direction [pixels] @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of C-array airydisk is copied into a column // of the datastore in row-major order size_t cAiryDisk=ds->addCopiedImageAsColumn(airydisk, NX, NY, "imagedata"); diff --git a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro index b0e7bfdb8c..4bc509915b 100644 --- a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_imageplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_imageplot_modifier/README.md b/examples/simpletest_imageplot_modifier/README.md index 32d1f856a3..a061231069 100644 --- a/examples/simpletest_imageplot_modifier/README.md +++ b/examples/simpletest_imageplot_modifier/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple math image plot {#JKQtPlotterImagePlotModifier} -This project (see `./examples/simpletest_imageplot_modifier/`) creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here `sin(r)`). Then a second image (linearly scaling from 1 in the center to 0 at the borders) is used to modify the first image. The modification can alter several properties of the original image, like its saturation, its transparency (alpha) ... +# Example (JKQTPLotter): Simple math image plot {#JKQTPLotterImagePlotModifier} +This project (see `./examples/simpletest_imageplot_modifier/`) creates a JKQTPLotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here `sin(r)`). Then a second image (linearly scaling from 1 in the center to 0 at the borders) is used to modify the first image. The modification can alter several properties of the original image, like its saturation, its transparency (alpha) ... The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_modifier.cpp`](../simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp): ```.cpp @@ -17,12 +17,12 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=150; // image dimension in x-direction [pixels] @@ -45,7 +45,7 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of C-array airydisk is copied into a column // of the datastore in row-major order size_t cImage=ds->addCopiedImageAsColumn(image, NX, NY, "imagedata"); diff --git a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp index 66ad3ee6a4..77e5aa2ffc 100644 --- a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_imageplot_modifier.cpp - * Shows how to plot colored math images/matrices modified by a second data-column/image with JKQtPlotter + * Shows how to plot colored math images/matrices modified by a second data-column/image with JKQTPLotter * - * \ref JKQtPlotterImagePlotModifier + * \ref JKQTPLotterImagePlotModifier */ #include @@ -18,12 +18,12 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=150; // image dimension in x-direction [pixels] @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of C-array airydisk is copied into a column // of the datastore in row-major order size_t cImage=ds->addCopiedImageAsColumn(image, NX, NY, "imagedata"); diff --git a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro index b87c16caef..62871cf99a 100644 --- a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_imageplot_modifier -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_imageplot_nodatastore/README.md b/examples/simpletest_imageplot_nodatastore/README.md index 8bf48af996..e03ef21275 100644 --- a/examples/simpletest_imageplot_nodatastore/README.md +++ b/examples/simpletest_imageplot_nodatastore/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple math image plot without use of central JKQTdatastore {#JKQtPlotterImagePlotNoDatastore} -This project (see `./examples/simpletest_imageplot_nodatastore/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then given to a JKQTPMathImage to visualize it. The data is stored as a pointer directly in the JKQTPMathImage object. There is also a variant JKQTPColumnMathImage of JKQTPMathImage, which references a column in the internal JKQTdatastore and uses the data there for plotting. In both cases data has to be organized as a row-major matrix of values. JKQTPMathImage supports different dataytpes ([u]nit8/16/32/64,float,double see `JKQTPMathImageBase::DataType`) that can be configured e.g. by `set_data()`. +# Example (JKQTPLotter): Simple math image plot without use of central JKQTdatastore {#JKQTPLotterImagePlotNoDatastore} +This project (see `./examples/simpletest_imageplot_nodatastore/`) simply creates a JKQTPLotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is stored as a simple C-array in row-major ordering and then given to a JKQTPMathImage to visualize it. The data is stored as a pointer directly in the JKQTPMathImage object. There is also a variant JKQTPColumnMathImage of JKQTPMathImage, which references a column in the internal JKQTdatastore and uses the data there for plotting. In both cases data has to be organized as a row-major matrix of values. JKQTPMathImage supports different dataytpes ([u]nit8/16/32/64,float,double see `JKQTPMathImageBase::DataType`) that can be configured e.g. by `set_data()`. The soruce code of the main application is (see [`jkqtplotter_simpletest_imageplot_nodatastore.cpp`](../simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp): ```.cpp @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting diff --git a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp index 54e419133f..cf9ff5e0e8 100644 --- a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_imageplot_nodatastore.cpp * Simple math image plot without use of central JKQTdatastore * - * \ref JKQtPlotterImagePlotNoDatastore + * \ref JKQTPLotterImagePlotNoDatastore */ #include @@ -18,7 +18,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting diff --git a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro index c94aae8289..1c5d987bf8 100644 --- a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.pro @@ -11,7 +11,7 @@ CONFIG += qt QT += core gui xml svg greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_imageplot_opencv/README.md b/examples/simpletest_imageplot_opencv/README.md index 08413a9e23..2fd9592007 100644 --- a/examples/simpletest_imageplot_opencv/README.md +++ b/examples/simpletest_imageplot_opencv/README.md @@ -1,8 +1,8 @@ -# Example (JKQtPlotter): Simple math image plot, showin a 1-channel OpenCV cv::Mat {#JKQtPlotterImagePlotOpenCV} -This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). -To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. +# Example (JKQTPLotter): Simple math image plot, showin a 1-channel OpenCV cv::Mat {#JKQTPLotterImagePlotOpenCV} +This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQTPLotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). +To copy the data a special OpenCV Interface function `JKQTPCopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. -The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. +The function `JKQTPCopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQTPLotter with OPenCV. The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](../simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): ```.cpp @@ -22,14 +22,14 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -57,10 +57,10 @@ int main(int argc, char* argv[]) } - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of one channel of the openCV cv::Mat is copied into a column // of the datastore in row-major order - size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); + size_t cAiryDisk=JKQTPCopyCvMatToColumn(ds, airydisk, "imagedata"); // 4. create a graph (JKQTPColumnMathImage) with the column created above as data diff --git a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp index c15e285335..9a4dfda68d 100644 --- a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp +++ b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_imageplot_opencv.cpp * Simple math image plot, showin a 1-channel OpenCV cv::Mat * - * \ref JKQtPlotterImagePlotOpenCV + * \ref JKQTPLotterImagePlotOpenCV */ #include @@ -21,14 +21,14 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -56,10 +56,10 @@ int main(int argc, char* argv[]) } - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of one channel of the openCV cv::Mat is copied into a column // of the datastore in row-major order - size_t cAiryDisk=JKQTPcopyCvMatToColumn(ds, airydisk, "imagedata"); + size_t cAiryDisk=JKQTPCopyCvMatToColumn(ds, airydisk, "imagedata"); // 4. create a graph (JKQTPColumnMathImage) with the column created above as data diff --git a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro index d6822f8081..8a00c453d1 100644 --- a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro +++ b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_imageplot_opencv -# add OpenCV-interface to JKQTPdatastore +# add OpenCV-interface to JKQTPDatastore DEFINES += JKQTPLOTTER_OPENCV_INTERFACE diff --git a/examples/simpletest_impulsesplot/README.md b/examples/simpletest_impulsesplot/README.md index 6058e09ece..a3ad360db7 100644 --- a/examples/simpletest_impulsesplot/README.md +++ b/examples/simpletest_impulsesplot/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple impulse plots {#JKQtPlotterImpulsePlots} -This project (see `./examples/simpletest_impulsesplot/`) simply creates a JKQtPlotter widget (as a new window) and adds a single impulse graph. +# Example (JKQTPLotter): Simple impulse plots {#JKQTPLotterImpulsePlots} +This project (see `./examples/simpletest_impulsesplot/`) simply creates a JKQTPLotter widget (as a new window) and adds a single impulse graph. The soruce code of the main application is (see [`jkqtplotter_simpletest_impulsesplot.cpp`](../simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp). @@ -22,7 +22,7 @@ First data for a curve is calculated and stored in `QVector`: Now an impulse graph object is generated and added to the plot: ```.cpp - JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); + JKQTPImpulsesVerticalGraph* graph=new JKQTPImpulsesVerticalGraph(&plot); graph->set_xColumn(columnX); graph->set_yColumn(columnY); graph->set_lineWidth(2); @@ -36,9 +36,9 @@ The result looks like this: ![jkqtplotter_simpletest_impulsesplot](../../screenshots/jkqtplotter_simpletest_impulsesplot.png) -There is an alternative class `JKQTPimpulsesHorizontalGraph` which draws horizontal impulse plots: +There is an alternative class `JKQTPImpulsesHorizontalGraph` which draws horizontal impulse plots: ```.cpp - JKQTPimpulsesHorizontalGraph* graph=new JKQTPimpulsesHorizontalGraph(&plot); + JKQTPImpulsesHorizontalGraph* graph=new JKQTPImpulsesHorizontalGraph(&plot); graph->set_yColumn(columnX); graph->set_xColumn(columnY); graph->set_lineWidth(2); diff --git a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp index a78f7d7b93..b34e8bde78 100644 --- a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_impulsesplot.cpp - * Shows how to plot impulse graphs with JKQtPlotter + * Shows how to plot impulse graphs with JKQTPLotter * - * \ref JKQtPlotterImpulsePlots + * \ref JKQTPLotterImpulsePlots */ #include @@ -16,8 +16,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) QVector X, Y; @@ -32,7 +32,7 @@ int main(int argc, char* argv[]) size_t columnY=ds->addCopiedColumn(Y, "y"); // 4. create a vertical impulse graph in the plot, which plots the dataset X/Y: - JKQTPimpulsesVerticalGraph* graph=new JKQTPimpulsesVerticalGraph(&plot); + JKQTPImpulsesVerticalGraph* graph=new JKQTPImpulsesVerticalGraph(&plot); graph->set_xColumn(columnX); graph->set_yColumn(columnY); graph->set_lineWidth(2); diff --git a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro index 36fd4a0659..97aa932ee7 100644 --- a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_impulsesplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_logaxes/README.md b/examples/simpletest_logaxes/README.md index 66e7da27ea..f134aeb2f9 100644 --- a/examples/simpletest_logaxes/README.md +++ b/examples/simpletest_logaxes/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Line Graph with Logarithmic y-axis {#JKQtPlotterLogAxes} -This project (see `./examples/simpletest_logaxes/`) simply creates a JKQtPlotter widget (as a new window) and several line-graphs of different resonance curves. +# Example (JKQTPLotter): Line Graph with Logarithmic y-axis {#JKQTPLotterLogAxes} +This project (see `./examples/simpletest_logaxes/`) simply creates a JKQTPLotter widget (as a new window) and several line-graphs of different resonance curves. The source code of the main application can be found in [`jkqtplotter_simpletest_logaxes.cpp`](../simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp). Mainly several graphs are generated in a loop and then different line styles are applied to the graphs (set by ``graph->set_style()`). The colors are set automtically from an internal default palette. The main loop looks like this: @@ -12,14 +12,14 @@ The source code of the main application can be found in [`jkqtplotter_simpletes Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); } - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph=new JKQTPXYLineGraph(&plot); // copy data into datastore and immediately set the yColumn graph->set_xColumn(columnX); graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); // don't use symbols - graph->set_symbol(JKQTPnoSymbol); + graph->set_symbol(JKQTPNoSymbol); // use one of different pens graph->set_style(pens[id%pens.size()]); // set width of graph line @@ -33,10 +33,10 @@ The source code of the main application can be found in [`jkqtplotter_simpletes } ``` -Then a `JKQTPgeoText` is added to the graph, which shows the function plotted in the plot: +Then a `JKQTPGeoText` is added to the graph, which shows the function plotted in the plot: ```.cpp // 4. Also we add a text-element in the plot to show the plotted function - // This element (JKQTPgeoText) is taken from the set of geometric elements + // This element (JKQTPGeoText) is taken from the set of geometric elements // and is simply parametrized by a position (1.25/10) and the text to display. // In addition you can also set the font size (here to 15) // Use '$...$' around the actual math string to ensure rendering with a math font @@ -44,7 +44,7 @@ Then a `JKQTPgeoText` is added to the graph, which shows the function plotted in // and loaded in the library). If you don't use the math-mode modifiers, the default // font of the other rendering text is used, which might not be suitable for // high-quality math rendering. - plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); + plot.addGraph(new JKQTPGeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); ``` The difference between not using and using `$...$` for the equation can be seen here: - no $-math-mode: ![](../../screenshots/jkqtplotter_simpletest_logaxes_lowqmathrendering.png) diff --git a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp index 10930aac55..8a95834cf7 100644 --- a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_logaxes.cpp - * Shows how to use logarithmic axes with JKQtPlotter + * Shows how to use logarithmic axes with JKQTPLotter * - * \ref JKQtPlotterLogAxes + * \ref JKQTPLotterLogAxes */ #include @@ -17,8 +17,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data a vector of x-values for a simple plot (resonance curve with different damping value D) // see https://en.wikipedia.org/wiki/Resonance @@ -42,14 +42,14 @@ int main(int argc, char* argv[]) Y<<1.0/sqrt(sqr(1-sqr(xx))+sqr(2*xx*D[id])); } - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph=new JKQTPXYLineGraph(&plot); // copy data into datastore and immediately set the yColumn graph->set_xColumn(columnX); graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(id))); // don't use symbols - graph->set_symbol(JKQTPnoSymbol); + graph->set_symbol(JKQTPNoSymbol); // use one of different pens graph->set_style(pens[id%pens.size()]); // set width of graph line @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) } // 4. Also we add a text-element in the plot to show the plotted function - // This element (JKQTPgeoText) is taken from the set of geometric elements + // This element (JKQTPGeoText) is taken from the set of geometric elements // and is simply parametrized by a position (1.25/10) and the text to display. // In addition you can also set the font size (here to 15) // Use '$...$' around the actual math string to ensure rendering with a math font @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) // and loaded in the library). If you don't use the math-mode modifiers, the default // font of the other rendering text is used, which might not be suitable for // high-quality math rendering. - plot.addGraph(new JKQTPgeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); + plot.addGraph(new JKQTPGeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); // 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) plot.get_yAxis()->set_logAxis(true); diff --git a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro index 6c092b6135..3c17882dad 100644 --- a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_logaxes -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_parametriccurve/README.md b/examples/simpletest_parametriccurve/README.md index 1a685c879f..676e03a8ec 100644 --- a/examples/simpletest_parametriccurve/README.md +++ b/examples/simpletest_parametriccurve/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Plotting Parametric Curves {#JKQtPlotterParametricCurves} -This project (see `./examples/simpletest_parametriccurve/`) demonstrates how to draw parametric curves, using [`JKQTPxyLineGraph`}(../simpletest) and [`JKQTPxyParametrizedScatterGraph`](../simpletest_paramscatterplot). +# Example (JKQTPLotter): Plotting Parametric Curves {#JKQTPLotterParametricCurves} +This project (see `./examples/simpletest_parametriccurve/`) demonstrates how to draw parametric curves, using [`JKQTPXYLineGraph`}(../simpletest) and [`JKQTPXYParametrizedScatterGraph`](../simpletest_paramscatterplot). The source code of the main application can be found in [`jkqtplotter_simpletest_parametriccurve.cpp`](../simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp). First, the parametric curve (here a [logarithic spiral](https://en.wikipedia.org/wiki/Logarithmic_spiral)) is sampled into two columns containing the x- and y-values along the curve. In addition the radial distance from x=y=0 is added into a third column: ```.cpp @@ -24,23 +24,23 @@ The source code of the main application can be found in [`jkqtplotter_simpletes Then simples graph just uses the columns X and Y to plot the curve: ```.cpp - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph1=new JKQTPXYLineGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_drawLine(true); - graph1->set_symbol(JKQTPnoSymbol); + graph1->set_symbol(JKQTPNoSymbol); graph1->set_title("one-colored spiral"); plot.addGraph(graph1); ``` -If you use `JKQTPxyParametrizedScatterGraph` instead of `JKQTPxyLineGraph`, you can also modify the color of the line-segments, connecting the datapoints: +If you use `JKQTPXYParametrizedScatterGraph` instead of `JKQTPXYLineGraph`, you can also modify the color of the line-segments, connecting the datapoints: ```.cpp - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); + JKQTPXYParametrizedScatterGraph* graph2=new JKQTPXYParametrizedScatterGraph(&plot2); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY); graph2->set_colorColumn(columnR); graph2->set_palette(JKQTPMathImageMATLAB); - graph2->set_symbol(JKQTPnoSymbol); + graph2->set_symbol(JKQTPNoSymbol); graph2->set_drawLine(true); graph2->set_title("colored spiral"); graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); diff --git a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp index e686f6aa98..3d278916cd 100644 --- a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_parametriccurve.cpp - * Shows how to plot parametric curves from datapoints with JKQtPlotter + * Shows how to plot parametric curves from datapoints with JKQTPLotter * - * \ref JKQtPlotterParametricCurves + * \ref JKQTPLotterParametricCurves */ #include @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create two plotter windows that share the same internal datastore (for convenience) - JKQtPlotter plot, plot2; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot, plot2; + JKQTPDatastore* ds=plot.getDatastore(); plot2.useExternalDatastore(ds); // 2. now we create a vector of x- and y-values of the logarithmic spiral @@ -42,22 +42,22 @@ int main(int argc, char* argv[]) // a datacolumn // 3.1 the basic graph - JKQTPxyLineGraph* graph1=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph1=new JKQTPXYLineGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_drawLine(true); - graph1->set_symbol(JKQTPnoSymbol); + graph1->set_symbol(JKQTPNoSymbol); graph1->set_title("one-colored spiral"); plot.addGraph(graph1); // 3.2 for graph2 is the same as graph 1, but in addition, the color of the lines // is set, based on the contents of column R, via the color-palette JKQTPMathImageMATLAB - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot2); + JKQTPXYParametrizedScatterGraph* graph2=new JKQTPXYParametrizedScatterGraph(&plot2); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY); graph2->set_colorColumn(columnR); graph2->set_palette(JKQTPMathImageMATLAB); - graph2->set_symbol(JKQTPnoSymbol); + graph2->set_symbol(JKQTPNoSymbol); graph2->set_drawLine(true); graph2->set_title("colored spiral"); graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); diff --git a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro index 73f33fc96c..0e9f7632ca 100644 --- a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_parametriccurve -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_paramscatterplot/README.md b/examples/simpletest_paramscatterplot/README.md index c2d6da6f36..6c02b3dcf8 100644 --- a/examples/simpletest_paramscatterplot/README.md +++ b/examples/simpletest_paramscatterplot/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Scatter Graph with Parametrized Symbols/Colors {#JKQtPlotterParamScatter} -This project (see `./examples/simpletest_paramscatterplot/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph`. This graph class plots symbol&line-graphs, juts like [`JKQTPxyLineGraph`](../simpletest_symbols_and_styles/) and in addition modifies several properties of each plot point by data from an additional column. These properties can be modified: +# Example (JKQTPLotter): Scatter Graph with Parametrized Symbols/Colors {#JKQTPLotterParamScatter} +This project (see `./examples/simpletest_paramscatterplot/`) demonstrates the capabilities of `JKQTPXYParametrizedScatterGraph`. This graph class plots symbol&line-graphs, juts like [`JKQTPXYLineGraph`](../simpletest_symbols_and_styles/) and in addition modifies several properties of each plot point by data from an additional column. These properties can be modified: - symbol size - symbol type - symbol/line color @@ -11,9 +11,9 @@ The source code of the main application can be found in [`jkqtplotter_simpletes Then several plots are added that modify different properties. -The simplest case is to modify the symbol type. Simply set the property `symbolColumn` with `graph1->set_symbolColumn(columnP)` to a data column. The values in the data column will be cast to an integer and then will be translated to `JKQTPgraphSymbols`. If the numbers are larger than the available symbol types in `JKQTPgraphSymbols`, the graph will cycle through the available symbols (via a modulo-operation with the max. symbol count!). +The simplest case is to modify the symbol type. Simply set the property `symbolColumn` with `graph1->set_symbolColumn(columnP)` to a data column. The values in the data column will be cast to an integer and then will be translated to `JKQTPGraphSymbols`. If the numbers are larger than the available symbol types in `JKQTPGraphSymbols`, the graph will cycle through the available symbols (via a modulo-operation with the max. symbol count!). ```.cpp - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph1=new JKQTPXYParametrizedScatterGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY1); graph1->set_symbolColumn(columnP); @@ -27,22 +27,22 @@ The simplest case is to modify the symbol type. Simply set the property `symbolC The next two code snippets show how to modify the size of the symbols and the line width of the lines, connecting the symbols (ensure to set `graph6->set_drawLine(true)`, because otherwise no line will be drawn). The principle is the same as above, but here you need to set the properties `sizeColumn` for the symbol size and `linewidthColumn` for the line width. All values in the line width or symbol size columns are interpreted as sizes in dtp points (pt)! ```.cpp // symbol size - JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph3=new JKQTPXYParametrizedScatterGraph(&plot); graph3->set_xColumn(columnX); graph3->set_yColumn(columnY3); graph3->set_sizeColumn(columnS); - graph3->set_symbol(JKQTPfilledCircle); + graph3->set_symbol(JKQTPFilledCircle); graph3->set_drawLine(true); graph3->set_title("3: symbol size"); plot.addGraph(graph3); // line width - JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph6=new JKQTPXYParametrizedScatterGraph(&plot); graph6->set_xColumn(columnX); graph6->set_yColumn(columnY6); graph6->set_linewidthColumn(columnLW); graph6->set_drawLine(true); - graph6->set_symbol(JKQTPnoSymbol); + graph6->set_symbol(JKQTPNoSymbol); graph6->set_title("6: line width"); plot.addGraph(graph6); ``` @@ -62,25 +62,25 @@ Basically the data points in a RGB(A)-column will be interpreted by castig them Now you can add the graph. In order to interpret the color column as RGB(A)-values, ensure to set `graph4->set_colorColumnContainsRGB(true)`: ```.cpp - JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph4=new JKQTPXYParametrizedScatterGraph(&plot); graph4->set_xColumn(columnX); graph4->set_yColumn(columnY4); graph4->set_colorColumn(columnRGB); graph4->set_colorColumnContainsRGB(true); graph4->set_drawLine(true); - graph4->set_symbol(JKQTPfilledDownTriangle); + graph4->set_symbol(JKQTPFilledDownTriangle); graph4->set_title("4: RGB-color"); plot.addGraph(graph4); ``` The second variant for setting the color of each datapoint is by mapping the values in the column to a color palette (`JKQTPMathImageRYGB` in this example). For this you simply need to define the color coumn and the palette to use. By default, the color palette spans the full range of values in `colorColumn`: ```.cpp - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph2=new JKQTPXYParametrizedScatterGraph(&plot); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_colorColumn(columnC); graph2->set_palette(JKQTPMathImageRYGB); - graph2->set_symbol(JKQTPfilledRect); + graph2->set_symbol(JKQTPFilledRect); graph2->set_drawLine(true); graph2->set_title("2: color"); graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); @@ -91,7 +91,7 @@ Note: If you want to set the range manually, use `ste_imageMin()` and `set_image Note also that it is possible to combine any of parametrizations above in a single graph, by setting two or more columns: ```.cpp - JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph5=new JKQTPXYParametrizedScatterGraph(&plot); graph5->set_xColumn(columnX); graph5->set_yColumn(columnY5); graph5->set_colorColumn(columnC); diff --git a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp index b8f75cbdc4..7f9c949db6 100644 --- a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_paramscatterplot.cpp - * JKQtPlotter: Examples: Scatter Graph with Parametrized Symbols/Colors + * JKQTPLotter: Examples: Scatter Graph with Parametrized Symbols/Colors * - * \ref JKQtPlotterParamScatter + * \ref JKQTPLotterParamScatter */ #include @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create a vector of x- and y-values for a simple plot (a sine curve) // in addition, a vector P will hold values that will be mapped onto different plot styles @@ -59,7 +59,7 @@ int main(int argc, char* argv[]) // 3.1 for graph1, we use dataset X/Y1 // and the symbol type is choose according to the contents of column P: - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph1=new JKQTPXYParametrizedScatterGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY1); graph1->set_symbolColumn(columnP); @@ -71,12 +71,12 @@ int main(int argc, char* argv[]) // 3.2 for graph2, we use dataset X/Y2 // and the symbol color is choose according to the contents of column C // and the actual colors are chose from palette JKQTPMathImageRYGB: - JKQTPxyParametrizedScatterGraph* graph2=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph2=new JKQTPXYParametrizedScatterGraph(&plot); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_colorColumn(columnC); graph2->set_palette(JKQTPMathImageRYGB); - graph2->set_symbol(JKQTPfilledRect); + graph2->set_symbol(JKQTPFilledRect); graph2->set_drawLine(true); graph2->set_title("2: color"); graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); @@ -84,11 +84,11 @@ int main(int argc, char* argv[]) // 3.3 for graph3, we use dataset X/Y3 // and the symbol size is choose according to the contents of column S: - JKQTPxyParametrizedScatterGraph* graph3=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph3=new JKQTPXYParametrizedScatterGraph(&plot); graph3->set_xColumn(columnX); graph3->set_yColumn(columnY3); graph3->set_sizeColumn(columnS); - graph3->set_symbol(JKQTPfilledCircle); + graph3->set_symbol(JKQTPFilledCircle); graph3->set_drawLine(true); graph3->set_title("3: symbol size"); plot.addGraph(graph3); @@ -96,13 +96,13 @@ int main(int argc, char* argv[]) // 3.4 for graph4, we use X/Y4 // and the symbol color is choose according to the contents of column RGB, // which directly contains the RGB values, as set with qRgb(): - JKQTPxyParametrizedScatterGraph* graph4=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph4=new JKQTPXYParametrizedScatterGraph(&plot); graph4->set_xColumn(columnX); graph4->set_yColumn(columnY4); graph4->set_colorColumn(columnRGB); graph4->set_colorColumnContainsRGB(true); graph4->set_drawLine(true); - graph4->set_symbol(JKQTPfilledDownTriangle); + graph4->set_symbol(JKQTPFilledDownTriangle); graph4->set_title("4: RGB-color"); plot.addGraph(graph4); @@ -110,7 +110,7 @@ int main(int argc, char* argv[]) // and the symbol color and size are choose according to the contents // of columns C and S respectively. // The actual colors are chose from palette JKQTPMathImageBLUEYELLOW: - JKQTPxyParametrizedScatterGraph* graph5=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph5=new JKQTPXYParametrizedScatterGraph(&plot); graph5->set_xColumn(columnX); graph5->set_yColumn(columnY5); graph5->set_colorColumn(columnC); @@ -123,33 +123,33 @@ int main(int argc, char* argv[]) // 3.6 for graph2, we use dataset X/Y6 // and the line width is set by column LW: - JKQTPxyParametrizedScatterGraph* graph6=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph6=new JKQTPXYParametrizedScatterGraph(&plot); graph6->set_xColumn(columnX); graph6->set_yColumn(columnY6); graph6->set_linewidthColumn(columnLW); graph6->set_drawLine(true); - graph6->set_symbol(JKQTPnoSymbol); + graph6->set_symbol(JKQTPNoSymbol); graph6->set_title("6: line width"); plot.addGraph(graph6); // 3.7 for graph2, we use dataset X/Y7 // and the line width is set by column LW and the color from palette JKQTPMathImageBLUEYELLOW via column C: - JKQTPxyParametrizedScatterGraph* graph7=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph7=new JKQTPXYParametrizedScatterGraph(&plot); graph7->set_xColumn(columnX); graph7->set_yColumn(columnY7); graph7->set_linewidthColumn(columnLW); graph7->set_drawLine(true); graph7->set_colorColumn(columnC); graph7->set_palette(JKQTPMathImageBLUEYELLOW); - graph7->set_symbol(JKQTPnoSymbol); + graph7->set_symbol(JKQTPNoSymbol); graph7->set_colorBarRightVisible(false); graph7->set_colorBarTopVisible(false); graph7->set_title("7: color+line width"); plot.addGraph(graph7); // 4. autoscale the plot so the graph is contained and format the coordinate system and key - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideBottomLeft); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideBottomLeft); + plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); plot.get_xAxis()->set_axisLabel("x-axis"); plot.get_yAxis()->set_axisLabel("y-axis"); plot.get_xAxis()->set_drawGrid(false); diff --git a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro index e2ef8fcde4..54dcff7ed2 100644 --- a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_paramscatterplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_paramscatterplot_image/README.md b/examples/simpletest_paramscatterplot_image/README.md index 779a870ab4..c964026ffd 100644 --- a/examples/simpletest_paramscatterplot_image/README.md +++ b/examples/simpletest_paramscatterplot_image/README.md @@ -1,7 +1,7 @@ -# Example (JKQtPlotter): Draw an Artistic Image with a Parametrized Scatter Graph {#JKQtPlotterParamScatterImage} -This project (see `./examples/simpletest_paramscatterplot_image/`) demonstrates the capabilities of `JKQTPxyParametrizedScatterGraph` to display parametrized scatters in a rectangular arrangement. See the test program in [`test/simpletest_paramscatterplot`](../simpletest_paramscatterplot) for a basic example of the capabilities of `JKQTPxyParametrizedScatterGraph`. +# Example (JKQTPLotter): Draw an Artistic Image with a Parametrized Scatter Graph {#JKQTPLotterParamScatterImage} +This project (see `./examples/simpletest_paramscatterplot_image/`) demonstrates the capabilities of `JKQTPXYParametrizedScatterGraph` to display parametrized scatters in a rectangular arrangement. See the test program in [`test/simpletest_paramscatterplot`](../simpletest_paramscatterplot) for a basic example of the capabilities of `JKQTPXYParametrizedScatterGraph`. -In this example, we load an image, convert it to greyscale and store it, together with x/y-coordinate-vectors in the datastore. Then a `JKQTPxyParametrizedScatterGraph` is used to draw the image as a pointilistic artwork, where each pixel is represented by a disk. The color of the disk is chosen from a color-palette, based on the grey-value. The size of each disk is chosen from the inverse grey value. +In this example, we load an image, convert it to greyscale and store it, together with x/y-coordinate-vectors in the datastore. Then a `JKQTPXYParametrizedScatterGraph` is used to draw the image as a pointilistic artwork, where each pixel is represented by a disk. The color of the disk is chosen from a color-palette, based on the grey-value. The size of each disk is chosen from the inverse grey value. First we prepare the data, as described above. The image is loaded and then converted to the required data vectors. ```.cpp @@ -31,13 +31,13 @@ First we prepare the data, as described above. The image is loaded and then conv size_t columnS=ds->addCopiedColumn(pointSizes, "pointSizes"); ``` -Now we can use th datavectors to add a `JKQTPxyParametrizedScatterGraph`: +Now we can use th datavectors to add a `JKQTPXYParametrizedScatterGraph`: ```.cpp - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph1=new JKQTPXYParametrizedScatterGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_sizeColumn(columnS); - graph1->set_symbol(JKQTPfilledCircle); + graph1->set_symbol(JKQTPFilledCircle); graph1->set_colorColumn(columnG); graph1->set_palette(JKQTPMathImageMATLAB); graph1->set_drawLine(false); diff --git a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp index 47ec618319..e9be6967ee 100644 --- a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp +++ b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_paramscatterplot_image.cpp - * JKQtPlotter: Examples: Draw an Artistic Image with a Parametrized Scatter Graph + * JKQTPLotter: Examples: Draw an Artistic Image with a Parametrized Scatter Graph * - * \ref JKQtPlotterParamScatterImage + * \ref JKQTPLotterParamScatterImage */ #include @@ -15,8 +15,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. Prepare Data // 2.1 load image @@ -48,12 +48,12 @@ int main(int argc, char* argv[]) // 3.1 Now add a parametrized scatter graph with columnX, columnY for the positions of the // scatter points, where the symbol size is given by column columnS and the color of // each symbol is set from column columnG, via a color palette JKQTPMathImageMATLAB - JKQTPxyParametrizedScatterGraph* graph1=new JKQTPxyParametrizedScatterGraph(&plot); + JKQTPXYParametrizedScatterGraph* graph1=new JKQTPXYParametrizedScatterGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_sizeColumn(columnS); graph1->set_symbolColumn(columnS); - graph1->set_symbol(JKQTPfilledTriangle); + graph1->set_symbol(JKQTPFilledTriangle); graph1->set_colorColumn(columnG); graph1->set_palette(JKQTPMathImageOCEAN); graph1->set_drawLine(false); diff --git a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro index 06dc25c53e..9f9414d1ce 100644 --- a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro +++ b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.pro @@ -12,7 +12,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_paramscatterplot_image -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_parsedfunctionplot/README.md b/examples/simpletest_parsedfunctionplot/README.md index 2dea484c81..7c728ec7e2 100644 --- a/examples/simpletest_parsedfunctionplot/README.md +++ b/examples/simpletest_parsedfunctionplot/README.md @@ -1,29 +1,29 @@ -# Example (JKQtPlotter): Plotting Parsed Mathematical Functions as Line Graphs {#JKQtPlotterParsedFunctionPlot} +# Example (JKQTPLotter): Plotting Parsed Mathematical Functions as Line Graphs {#JKQTPLotterParsedFunctionPlot} ## Plot Function f(x) -This project (see `./examples/simpletest_parsedfunctionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions are defined as strings that will be evaluated with the equation parser, integrated into JKQtPlotter. +This project (see `./examples/simpletest_parsedfunctionplot/`) demonstrates how to plot mathematical functions as line graphs. The functions are defined as strings that will be evaluated with the equation parser, integrated into JKQTPLotter. Note: See the example [Plotting Mathematical Functions as Line Graphs](../simpletest_functionplot) if you don't want to draw parsed functions, but want to provide a C function, or C++ functor! Adding an evaluated funtion to a graph is very simple: ```.cpp - JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot); + JKQTPXParsedFunctionLineGraph* parsedFunc=new JKQTPXParsedFunctionLineGraph(plot); parsedFunc->set_function("sin(x*8)*exp(-x/4)"); parsedFunc->set_title("user function"); ``` -As you can see a graph of the type `JKQTPxParsedFunctionLineGraph` is used, which plots a function that depends on the variable `x`. The given function is parsed and evaluated (see [`lib/jkqtplottertools/jkqtpmathparser.h`](https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtplottertools/jkqtpmathparser.h) for details on the features of the math parser). An intelligent drawing algorithm chooses the number of control points for drawing a smooth graph, with sufficient amount of details, by evaluating locally the slope of the function. +As you can see a graph of the type `JKQTPXParsedFunctionLineGraph` is used, which plots a function that depends on the variable `x`. The given function is parsed and evaluated (see [`lib/jkqtplottertools/jkqtpmathparser.h`](https://github.com/jkriege2/JKQTPLotter/blob/master/lib/jkqtplottertools/jkqtpmathparser.h) for details on the features of the math parser). An intelligent drawing algorithm chooses the number of control points for drawing a smooth graph, with sufficient amount of details, by evaluating locally the slope of the function. In the example in [`test/simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp`](../simpletest_parsedfunctionplot/simpletest_parsedfunctionplot.cpp) we do not simply set a fixed function, but add a `QLineEdit` which allows to edit the function and redraws it, once ENTER is pressed: ```.cpp - JKQtPlotter* plot=new JKQtPlotter(&mainWin); + JKQTPLotter* plot=new JKQTPLotter(&mainWin); QLineEdit* edit=new QLineEdit(&mainWin); edit->setToolTip("enter a function in dependence of the variable x and press ENTER to update the graph"); // ... - // 2. now we add a JKQTPxParsedFunctionLineGraph object, which will draw the function from + // 2. now we add a JKQTPXParsedFunctionLineGraph object, which will draw the function from // the line edit - JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot); + JKQTPXParsedFunctionLineGraph* parsedFunc=new JKQTPXParsedFunctionLineGraph(plot); plot->addGraph(parsedFunc); // finally we connect the line edit with the graph, whenever RETURN is pressed, // the graph is updated: @@ -48,14 +48,14 @@ This code snippet results in a plot like this: As shown in [Plotting Mathematical Functions as Line Graphs](../simpletest_functionplot) you can also use externally set parameters in a plot function. These parameters can be double numbers and may be set with either as an internal parameter vector, or may be read from a parameter column (as shown in the [linked example](../simpletest_functionplot)). These parameters are available as variables `p1`, `p2`, ... in the function string. Here is a small example: ```.cpp - JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot); + JKQTPXParsedFunctionLineGraph* parsedFunc=new JKQTPXParsedFunctionLineGraph(plot); parsedFunc->set_function("sin(x*p1)*exp(-x/p2)"); parsedFunc->set_paramV(/*p1=*/8, /*p2=*/4); parsedFunc->set_title("user function"); ``` ## Plot Function f(y) -If you use the graph class `JKQTPyParsedFunctionLineGraph` instead of `JKQTPxParsedFunctionLineGraph`, you can plot functions `x=f(y)` (instead of `y=f(x)`). The function from the example above will then ahve to be changed to `sin(y*8)*exp(-y/4)` and the result will look like this: +If you use the graph class `JKQTPYParsedFunctionLineGraph` instead of `JKQTPXParsedFunctionLineGraph`, you can plot functions `x=f(y)` (instead of `y=f(x)`). The function from the example above will then ahve to be changed to `sin(y*8)*exp(-y/4)` and the result will look like this: ![jkqtplotter_simpletest_parsedfunctionplot_fy](../../screenshots/jkqtplotter_simpletest_parsedfunctionplot_fy.png) diff --git a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp index ebf768a109..113d235165 100644 --- a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp +++ b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_parsedfunctionplot.cpp - * JKQtPlotter: Examples: Plotting Parsed Mathematical Functions as Line Graphs + * JKQTPLotter: Examples: Plotting Parsed Mathematical Functions as Line Graphs * - * \ref JKQtPlotterParsedFunctionPlot + * \ref JKQTPLotterParsedFunctionPlot */ #include @@ -20,7 +20,7 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a window that conatins a line-edit to edit a function - // and a JKQtPlotter to display the function, combine everything in a layout + // and a JKQTPLotter to display the function, combine everything in a layout QWidget mainWin; QLineEdit* edit=new QLineEdit(&mainWin); edit->setToolTip("enter a function in dependence of the variable x and press ENTER to update the graph"); @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) spinP2->setValue(4); spinP2->setRange(-10000,10000); spinP2->setToolTip("enter a Value for parameter p1 and press ENTER to update the graph"); - JKQtPlotter* plot=new JKQtPlotter(&mainWin); + JKQTPLotter* plot=new JKQTPLotter(&mainWin); QFormLayout* flayout=new QFormLayout; QVBoxLayout* layout=new QVBoxLayout; mainWin.setLayout(layout); @@ -44,9 +44,9 @@ int main(int argc, char* argv[]) layout->addLayout(flayout); layout->addWidget(plot); - // 2. now we add a JKQTPxParsedFunctionLineGraph object, which will draw the function from + // 2. now we add a JKQTPXParsedFunctionLineGraph object, which will draw the function from // the line edit - JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot); + JKQTPXParsedFunctionLineGraph* parsedFunc=new JKQTPXParsedFunctionLineGraph(plot); plot->addGraph(parsedFunc); // finally we connect the line edit with the graph, whenever RETURN is pressed, // the graph is updated: diff --git a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro index fa8a67c31c..29d3e4ce51 100644 --- a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro +++ b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_parsedfunctionplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_rgbimageplot_opencv/README.md b/examples/simpletest_rgbimageplot_opencv/README.md index 10716f2def..8d914077e6 100644 --- a/examples/simpletest_rgbimageplot_opencv/README.md +++ b/examples/simpletest_rgbimageplot_opencv/README.md @@ -1,8 +1,8 @@ -# Example (JKQtPlotter): Simple RGB image plot, showing a 3-channel OpenCV cv::Mat {#JKQtPlotterImagePlotRGBOpenCV} -This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). -To copy the data a special OpenCV Interface function `JKQTPcopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. +# Example (JKQTPLotter): Simple RGB image plot, showing a 3-channel OpenCV cv::Mat {#JKQTPLotterImagePlotRGBOpenCV} +This project (see `./examples/simpletest_imageplot_opencv/`) simply creates a JKQTPLotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore). +To copy the data a special OpenCV Interface function `JKQTPCopyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column. -The function `JKQTPcopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQtPlotter with OPenCV. +The function `JKQTPCopyCvMatToColumn()` is available from the (non-default) header-only extension from `jkqtplotter/jkqtpopencvinterface.h`. This header provides facilities to interface JKQTPLotter with OPenCV. The source code of the main application is (see [`jkqtplotter_simpletest_imageplot_opencv.cpp`](../simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp): ```.cpp @@ -20,14 +20,14 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we open a BMP-file and load it into an OpenCV cv::Mat @@ -35,12 +35,12 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of each channel of the openCV cv::Mat is copied into a column // of the datastore in row-major order - size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); - size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); - size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); + size_t cPictureR=JKQTPCopyCvMatToColumn(ds, picture, "R-channel", 2); + size_t cPictureG=JKQTPCopyCvMatToColumn(ds, picture, "G-channel", 1); + size_t cPictureB=JKQTPCopyCvMatToColumn(ds, picture, "B-channel", 0); // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data @@ -97,6 +97,6 @@ The result looks like this: ![jkqtplotter_simpletest_imageplot](../../screenshots/jkqtplotter_simpletest_rgbimageplot_opencv.png) -The image is upside-down, because computer images use a coordinate system with 0 at the top-left (left-handed coordinate system) and the JKQtPlotter has its 0 at the bottom-left (right-handed coordinate system). +The image is upside-down, because computer images use a coordinate system with 0 at the top-left (left-handed coordinate system) and the JKQTPLotter has its 0 at the bottom-left (right-handed coordinate system). diff --git a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp index d4211011f6..67d840a615 100644 --- a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp +++ b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_rgbimageplot_opencv.cpp - * JKQtPlotter: Examples: Simple RGB image plot, showing a 3-channel OpenCV cv::Mat + * JKQTPLotter: Examples: Simple RGB image plot, showing a 3-channel OpenCV cv::Mat * - * \ref JKQtPlotterImagePlotRGBOpenCV + * \ref JKQTPLotterImagePlotRGBOpenCV */ #include @@ -18,14 +18,14 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we open a BMP-file and load it into an OpenCV cv::Mat @@ -33,12 +33,12 @@ int main(int argc, char* argv[]) - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // In this step the contents of each channel of the openCV cv::Mat is copied into a column // of the datastore in row-major order - size_t cPictureR=JKQTPcopyCvMatToColumn(ds, picture, "R-channel", 2); - size_t cPictureG=JKQTPcopyCvMatToColumn(ds, picture, "G-channel", 1); - size_t cPictureB=JKQTPcopyCvMatToColumn(ds, picture, "B-channel", 0); + size_t cPictureR=JKQTPCopyCvMatToColumn(ds, picture, "R-channel", 2); + size_t cPictureG=JKQTPCopyCvMatToColumn(ds, picture, "G-channel", 1); + size_t cPictureB=JKQTPCopyCvMatToColumn(ds, picture, "B-channel", 0); // 4. create a graph (JKQTPColumnRGBMathImage) with the columns created above as data diff --git a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro index 8ff29d874b..47b29bba0a 100644 --- a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro +++ b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.pro @@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_rgbimageplot_opencv -# add OpenCV-interface to JKQTPdatastore +# add OpenCV-interface to JKQTPDatastore DEFINES += JKQTPLOTTER_OPENCV_INTERFACE diff --git a/examples/simpletest_rgbimageplot_qt/README.md b/examples/simpletest_rgbimageplot_qt/README.md index 1fa9db2f9e..fbd26eb493 100644 --- a/examples/simpletest_rgbimageplot_qt/README.md +++ b/examples/simpletest_rgbimageplot_qt/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): QImage as a Graph {#JKQtPlotterImagePlotQImageRGB} -This project (see `./examples/simpletest_rgbimageplot_qt/`) simply creates a JKQtPlotter widget (as a new window) and adds an image plot with an image taken from a [QImage](http://doc.qt.io/qt-5/qimage.html) object. +# Example (JKQTPLotter): QImage as a Graph {#JKQTPLotterImagePlotQImageRGB} +This project (see `./examples/simpletest_rgbimageplot_qt/`) simply creates a JKQTPLotter widget (as a new window) and adds an image plot with an image taken from a [QImage](http://doc.qt.io/qt-5/qimage.html) object. The source code of the main application is (see [`jkqtplotter_simpletest_rgbimageplot_qt.cpp`](../simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp). the main parts are: ```.cpp diff --git a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp index 32bde9ee3b..4afd614c01 100644 --- a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_rgbimageplot_qt.cpp - * JKQtPlotter: Examples: `QImage` as a Graph + * JKQTPLotter: Examples: `QImage` as a Graph * - * \ref JKQtPlotterImagePlotQImageRGB + * \ref JKQTPLotterImagePlotQImageRGB */ #include @@ -16,7 +16,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plot; + JKQTPLotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) diff --git a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro index 9b74f1900d..e8f456c8b7 100644 --- a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.pro @@ -12,7 +12,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_rgbimageplot_qt -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_speed/README.md b/examples/simpletest_speed/README.md index 4d38b9971a..5b57d7b48a 100644 --- a/examples/simpletest_speed/README.md +++ b/examples/simpletest_speed/README.md @@ -1,12 +1,12 @@ -# Example (JKQtPlotter): Simple line-graph with live-data (speed test) {#JKQtPlotterSpeedTest} -This project (see `./examples/simpletest_speed/`) simply creates a JKQtPlotter widget (as a new window) and adds two line-graph (a sine and a cosine wave). +# Example (JKQTPLotter): Simple line-graph with live-data (speed test) {#JKQTPLotterSpeedTest} +This project (see `./examples/simpletest_speed/`) simply creates a JKQTPLotter widget (as a new window) and adds two line-graph (a sine and a cosine wave). Data is stored in two [`std::array`](https://en.cppreference.com/w/cpp/container/array) objects (`X`, `Y`, and `Y2`) and the data is added as external pointer to the datastore: ```.cpp - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Here the data from the std::array's is not copied, but only the pointer to // the array is added to the datastore. therefore the datastore does not manage // the memory, oly uses the data stored in it! - JKQTPdatastore* ds=getDatastore(); + JKQTPDatastore* ds=getDatastore(); size_t columnX=ds->addColumn(X.data(), X.size(), "x"); size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); @@ -54,7 +54,7 @@ The result looks like this: ![jkqtplotter_simpletest_speed1](../../screenshots/jkqtplotter_simpletest_speed.png) There are different facor affecting the replot speed: -1. *Anti-Aliasing:* If `JKQtPlotter` uses Anti-Aliasing for plotting, the plots are much nicer, but also about a factor of 3-4 slower. This is due to the increased amount of calculations, necessary in the drawing sub-system of Qt. +1. *Anti-Aliasing:* If `JKQTPLotter` uses Anti-Aliasing for plotting, the plots are much nicer, but also about a factor of 3-4 slower. This is due to the increased amount of calculations, necessary in the drawing sub-system of Qt. You can configrue anti-aliasing with these calls: ```.cpp plot.get_plotter()->set_useAntiAliasingForGraphs(false); diff --git a/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro b/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro index ef4e757862..4611158cd1 100644 --- a/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro +++ b/examples/simpletest_speed/jkqtplotter_simpletest_speed.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_speed -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_speed/speedtestplot.cpp b/examples/simpletest_speed/speedtestplot.cpp index 443e4428f5..e52ea0371c 100644 --- a/examples/simpletest_speed/speedtestplot.cpp +++ b/examples/simpletest_speed/speedtestplot.cpp @@ -1,7 +1,7 @@ /** \example speedtestplot.cpp - * JKQtPlotter: Examples: Simple line-graph with live-data (speed test) + * JKQTPLotter: Examples: Simple line-graph with live-data (speed test) * - * \ref JKQtPlotterSpeedTest + * \ref JKQTPLotterSpeedTest */ #include "speedtestplot.h" @@ -9,10 +9,10 @@ SpeedTestPlot::SpeedTestPlot(): - JKQtPlotter(), dx(1.0/double(NDATA)*4.0*M_PI), x0(0) + JKQTPLotter(), dx(1.0/double(NDATA)*4.0*M_PI), x0(0) { - // 1. optimize JKQtPlotter for speed (by switching off anti-aliasing) + // 1. optimize JKQTPLotter for speed (by switching off anti-aliasing) get_plotter()->set_useAntiAliasingForGraphs(false); get_plotter()->set_useAntiAliasingForSystem(false); get_plotter()->set_useAntiAliasingForText(false); @@ -26,24 +26,24 @@ SpeedTestPlot::SpeedTestPlot(): Y2[i]=cos(x)+static_cast(std::rand())/static_cast(RAND_MAX + 1u)-0.5; } - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Here the data from the std::array's is not copied, but only the pointer to // the array is added to the datastore. therefore the datastore does not manage // the memory, oly uses the data stored in it! - JKQTPdatastore* ds=getDatastore(); + JKQTPDatastore* ds=getDatastore(); size_t columnX=ds->addColumn(X.data(), X.size(), "x"); size_t columnY=ds->addColumn(Y.data(), Y.size(), "y"); size_t columnY2=ds->addColumn(Y2.data(), Y2.size(), "y2"); // 4. create two graphs in the plot, which plots the dataset X/Y: - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(this); + JKQTPXYLineGraph* graph=new JKQTPXYLineGraph(this); graph->set_xColumn(columnX); graph->set_yColumn(columnY); graph->set_title(QObject::tr("live sin() graph")); graph->set_lineWidth(1); addGraph(graph); - JKQTPxyLineGraph* graph2=new JKQTPxyLineGraph(this); + JKQTPXYLineGraph* graph2=new JKQTPXYLineGraph(this); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_title(QObject::tr("live cos() graph")); diff --git a/examples/simpletest_speed/speedtestplot.h b/examples/simpletest_speed/speedtestplot.h index ef8cb80de3..a432c617c4 100644 --- a/examples/simpletest_speed/speedtestplot.h +++ b/examples/simpletest_speed/speedtestplot.h @@ -8,7 +8,7 @@ #define NDATA 500 -class SpeedTestPlot: public JKQtPlotter { +class SpeedTestPlot: public JKQTPLotter { Q_OBJECT protected: std::array X, Y, Y2; diff --git a/examples/simpletest_stackedbars/README.md b/examples/simpletest_stackedbars/README.md index 940dd299b1..68314a3d05 100644 --- a/examples/simpletest_stackedbars/README.md +++ b/examples/simpletest_stackedbars/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple stacked barchart {#JKQtPlotterStackedBarChart} -This project (see `./examples/simpletest_stackedbars/`) simply creates a JKQtPlotter widget (as a new window) and adds several stacked barcharts. +# Example (JKQTPLotter): Simple stacked barchart {#JKQTPLotterStackedBarChart} +This project (see `./examples/simpletest_stackedbars/`) simply creates a JKQTPLotter widget (as a new window) and adds several stacked barcharts. The soruce code of the main application is (see [`jkqtplotter_simpletest_stackedbars.cpp`](../simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp): ```.cpp @@ -13,11 +13,11 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; + JKQTPLotter plot; plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise) // the variables cYear, cOther ... will contain the internal column ID of the // newly created columns with names "year" and "other" ... and the (copied) data @@ -44,31 +44,31 @@ int main(int argc, char* argv[]) // The color of the graphs is set by calling set_fillColor_and_darkenedColor(), which sets the // fillColor to the given color and makes the outline of the bars (i.e. their "color") a darker // shade of the given color. - QVector graphs; - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + QVector graphs; + graphs.push_back(new JKQTPBarVerticalStackableGraph(&plot)); graphs.back()->set_xColumn(cYear); graphs.back()->set_yColumn(cOther); graphs.back()->set_title(QObject::tr("other sources")); graphs.back()->set_fillColor_and_darkenedColor(QColor("red")); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.push_back(new JKQTPBarVerticalStackableGraph(&plot)); graphs.back()->set_xColumn(cYear); graphs.back()->set_yColumn(cCoalOil); graphs.back()->set_title(QObject::tr("coal & oil")); graphs.back()->set_fillColor_and_darkenedColor(QColor("darkgrey")); graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.push_back(new JKQTPBarVerticalStackableGraph(&plot)); graphs.back()->set_xColumn(cYear); graphs.back()->set_yColumn(cGas); graphs.back()->set_title(QObject::tr("natural gas")); graphs.back()->set_fillColor_and_darkenedColor(QColor("blue")); graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.push_back(new JKQTPBarVerticalStackableGraph(&plot)); graphs.back()->set_xColumn(cYear); graphs.back()->set_yColumn(cNuclear); graphs.back()->set_title(QObject::tr("nuclear energy")); graphs.back()->set_fillColor_and_darkenedColor(QColor("gold")); graphs.back()->stackUpon(graphs[graphs.size()-2]); - graphs.push_back(new JKQTPbarVerticalStackableGraph(&plot)); + graphs.push_back(new JKQTPBarVerticalStackableGraph(&plot)); graphs.back()->set_xColumn(cYear); graphs.back()->set_yColumn(cGreen); graphs.back()->set_title(QObject::tr("green energy")); @@ -89,8 +89,8 @@ int main(int argc, char* argv[]) // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); @@ -104,8 +104,8 @@ int main(int argc, char* argv[]) ``` The result looks like this: -![JKQTPbarVerticalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarVerticalGraphStacked.png) +![JKQTPBarVerticalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/doc/images/JKQTPBarVerticalGraphStacked.png) -If you use `JKQTPbarHorizontalGraphStacked` instead of `JKQTPbarVerticalStackableGraph`, you'll get a result like this: -![JKQTPbarHorizontalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/JKQTPbarHorizontalGraphStacked.png) +If you use `JKQTPBarHorizontalGraphStacked` instead of `JKQTPBarVerticalStackableGraph`, you'll get a result like this: +![JKQTPBarHorizontalGraphStacked](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/doc/images/JKQTPBarHorizontalGraphStacked.png) diff --git a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp index 2b03e394d6..b3c99fb43f 100644 --- a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_stackedbars.cpp - * JKQtPlotter: Examples: Simple stacked barchart + * JKQTPLotter: Examples: Simple stacked barchart * - * \ref JKQtPlotterStackedBarChart + * \ref JKQTPLotterStackedBarChart */ #include @@ -11,12 +11,12 @@ template -void addGraph(JKQtPlotter& plot, bool swapXY) { +void addGraph(JKQTPLotter& plot, bool swapXY) { // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) QVector year, percentage_other, percentage_coaloil, percentage_gas, percentage_nuclear, percentage_green; @@ -28,7 +28,7 @@ void addGraph(JKQtPlotter& plot, bool swapXY) { percentage_green << 3.6 << 4.4 << 6.2 << 9.5 << 15.8 << 28.1; - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise) // the variables cYear, cOther ... will contain the internal column ID of the // newly created columns with names "year" and "other" ... and the (copied) data @@ -88,8 +88,8 @@ void addGraph(JKQtPlotter& plot, bool swapXY) { // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPkeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPkeyLayoutOneRow); + plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); + plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); @@ -104,13 +104,13 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - JKQtPlotter plotV; - addGraph(plotV, false); - plotV.setWindowTitle("JKQTPbarVerticalStackableGraph"); + JKQTPLotter plotV; + addGraph(plotV, false); + plotV.setWindowTitle("JKQTPBarVerticalStackableGraph"); - JKQtPlotter plotH; - addGraph(plotH, true); - plotH.setWindowTitle("JKQTPbarHorizontalStackableGraph"); + JKQTPLotter plotH; + addGraph(plotH, true); + plotH.setWindowTitle("JKQTPBarHorizontalStackableGraph"); plotV.move(100,100); plotH.move(750,100); diff --git a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro index 9e80bfa333..e4c5af371c 100644 --- a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_stackedbars -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_stepplots/README.md b/examples/simpletest_stepplots/README.md index 88b9f04d6e..f57638c8d5 100644 --- a/examples/simpletest_stepplots/README.md +++ b/examples/simpletest_stepplots/README.md @@ -1,35 +1,35 @@ -# Example (JKQtPlotter): Step Line Plots in Different Styles {#JKQtPlotterStepPlot} -This project (see `./examples/simpletest_stepplots/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. +# Example (JKQTPLotter): Step Line Plots in Different Styles {#JKQTPLotterStepPlot} +This project (see `./examples/simpletest_stepplots/`) simply creates a JKQTPLotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. -The source code of the main application can be found in [`jkqtplotter_simpletest_stepplots.cpp`](../simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp). For the most part, several datasets of cosine-curves are generated. then thrre tuples of graphs are added: One of type `JKQTPxyLineGraph`, which simply indicates the location of the actual datapoints. the second is of type `JKQTPstepHorizontalGraph`, which adds the step-graph to the plot: +The source code of the main application can be found in [`jkqtplotter_simpletest_stepplots.cpp`](../simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp). For the most part, several datasets of cosine-curves are generated. then thrre tuples of graphs are added: One of type `JKQTPXYLineGraph`, which simply indicates the location of the actual datapoints. the second is of type `JKQTPStepHorizontalGraph`, which adds the step-graph to the plot: ```.cpp // 3 now we make several plots with different step styles, each one also contains a // symbol plot indicating the location of the datapoints themselves - JKQTPstepHorizontalGraph* graph; - JKQTPxyLineGraph* graphL; + JKQTPStepHorizontalGraph* graph; + JKQTPXYLineGraph* graphL; - //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); + //-- JKQTPStepLeft ---------------------------------------------------------------------------------------- + graph=new JKQTPStepHorizontalGraph(&plot); + graphL=new JKQTPXYLineGraph(&plot); // set data for both graphs graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); // set step style - graph->set_stepType(JKQTPstepLeft); + graph->set_stepType(JKQTPStepLeft); graph->set_lineWidth(1); graph->set_fillCurve(true); graph->set_drawLine(true); - graph->set_title("JKQTPstepLeft, filled"); + graph->set_title("JKQTPStepLeft, filled"); ``` -Note that you can configure the step type (left/center/right by `graph->set_stepType(JKQTPstepLeft)`. With `graph->set_fillCurve(true)` you can draw the curve filled until the y=0-axis and with `graph->set_drawLine(true)` you can switch the line along the values on and off (e.g. to only have the filled area, but no line). +Note that you can configure the step type (left/center/right by `graph->set_stepType(JKQTPStepLeft)`. With `graph->set_fillCurve(true)` you can draw the curve filled until the y=0-axis and with `graph->set_drawLine(true)` you can switch the line along the values on and off (e.g. to only have the filled area, but no line). -Finally the `JKQTPxyLineGraph` is configured: +Finally the `JKQTPXYLineGraph` is configured: ```.cpp // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_symbol(JKQTPGraphSymbols::JKQTPCircle); graphL->set_drawLine(false); graphL->set_symbolSize(9); graphL->set_symbolWidth(1); diff --git a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp index a2ea5294b9..632244ba4c 100644 --- a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_stepplots.cpp - * JKQtPlotter: Examples: Step Line Plots in Different Styles + * JKQTPLotter: Examples: Step Line Plots in Different Styles * - * \ref JKQtPlotterStepPlot + * \ref JKQTPLotterStepPlot */ #include @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data a vector of x-values for a simple plot and several sets of y-values for // cosine curves stacked above each other @@ -36,26 +36,26 @@ int main(int argc, char* argv[]) // 3 now we make several plots with different step styles, each one also contains a // symbol plot indicating the location of the datapoints themselves - JKQTPstepHorizontalGraph* graph; - JKQTPxyLineGraph* graphL; + JKQTPStepHorizontalGraph* graph; + JKQTPXYLineGraph* graphL; - //-- JKQTPstepLeft ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); + //-- JKQTPStepLeft ---------------------------------------------------------------------------------------- + graph=new JKQTPStepHorizontalGraph(&plot); + graphL=new JKQTPXYLineGraph(&plot); // set data for both graphs graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); graph->set_yColumn(columnY1); graphL->set_yColumn(graph->get_yColumn()); // set step style - graph->set_stepType(JKQTPstepLeft); + graph->set_stepType(JKQTPStepLeft); graph->set_lineWidth(1); graph->set_fillCurve(true); graph->set_drawLine(true); - graph->set_title("JKQTPstepLeft, filled"); + graph->set_title("JKQTPStepLeft, filled"); // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_symbol(JKQTPGraphSymbols::JKQTPCircle); graphL->set_drawLine(false); graphL->set_symbolSize(9); graphL->set_symbolWidth(1); @@ -66,23 +66,23 @@ int main(int argc, char* argv[]) plot.addGraph(graphL); - //-- JKQTPstepCenter ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); + //-- JKQTPStepCenter ---------------------------------------------------------------------------------------- + graph=new JKQTPStepHorizontalGraph(&plot); + graphL=new JKQTPXYLineGraph(&plot); // set data for both graphs graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); graph->set_yColumn(columnY2); graphL->set_yColumn(graph->get_yColumn()); // set step style - graph->set_stepType(JKQTPstepCenter); + graph->set_stepType(JKQTPStepCenter); graph->set_lineWidth(1); graph->set_fillCurve(false); graph->set_drawLine(true); - graph->set_title("JKQTPstepCenter"); + graph->set_title("JKQTPStepCenter"); // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_symbol(JKQTPGraphSymbols::JKQTPCircle); graphL->set_drawLine(false); graphL->set_symbolSize(9); graphL->set_symbolWidth(1); @@ -93,23 +93,23 @@ int main(int argc, char* argv[]) plot.addGraph(graphL); - //-- JKQTPstepRight ---------------------------------------------------------------------------------------- - graph=new JKQTPstepHorizontalGraph(&plot); - graphL=new JKQTPxyLineGraph(&plot); + //-- JKQTPStepRight ---------------------------------------------------------------------------------------- + graph=new JKQTPStepHorizontalGraph(&plot); + graphL=new JKQTPXYLineGraph(&plot); // set data for both graphs graph->set_xColumn(columnX); graphL->set_xColumn(graph->get_xColumn()); graph->set_yColumn(columnY3); graphL->set_yColumn(graph->get_yColumn()); // set step style - graph->set_stepType(JKQTPstepRight); + graph->set_stepType(JKQTPStepRight); graph->set_lineWidth(1); graph->set_fillCurve(false); graph->set_drawLine(true); - graph->set_title("JKQTPstepRight"); + graph->set_title("JKQTPStepRight"); // set symbol + pen style and color for the added circles, copy color - graphL->set_symbol(JKQTPgraphSymbols::JKQTPcircle); + graphL->set_symbol(JKQTPGraphSymbols::JKQTPCircle); graphL->set_drawLine(false); graphL->set_symbolSize(9); graphL->set_symbolWidth(1); diff --git a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro index ac0f41f8b2..f6182693db 100644 --- a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_stepplots -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_symbols_and_errors/README.md b/examples/simpletest_symbols_and_errors/README.md index 59d22c16ad..f9bd59b572 100644 --- a/examples/simpletest_symbols_and_errors/README.md +++ b/examples/simpletest_symbols_and_errors/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Simple line-graph with error bars {#JKQtPlotterSymbolsErrors} -This project (see `./examples/simpletest_symbols_and_errors/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave) that has y-errorbars. In addition, this example shows how to change some of the axis properties and how to use LaTeX markup to format axis labels (can actually be used for all labels in JKQtPlotter). Also, in comparison to the last example, here we initialize the data from C-type arrays (double*), instead of QVector objects. +# Example (JKQTPLotter): Simple line-graph with error bars {#JKQTPLotterSymbolsErrors} +This project (see `./examples/simpletest_symbols_and_errors/`) simply creates a JKQTPLotter widget (as a new window) and adds a single line-graph (a sine-wave) that has y-errorbars. In addition, this example shows how to change some of the axis properties and how to use LaTeX markup to format axis labels (can actually be used for all labels in JKQTPLotter). Also, in comparison to the last example, here we initialize the data from C-type arrays (double*), instead of QVector objects. The soruce code of the main application is (see [`jkqtplotter_simpletest_symbols_and_errors.cpp`](../simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp): ```.cpp @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) double X[Ndata], Y[Ndata], YERROR[Ndata]; @@ -25,7 +25,7 @@ int main(int argc, char* argv[]) YERROR[i]=0.2+double(i)/double(Ndata)*0.25; } - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise), so you can // reuse X and Y afterwards! // the variables columnX and columnY will contain the internal column ID of the newly @@ -35,12 +35,12 @@ int main(int argc, char* argv[]) size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); + JKQTPXYLineErrorGraph* graph1=new JKQTPXYLineErrorGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_yErrorColumn(columnYE); - graph1->set_symbol(JKQTPfilledStar); // set symbol style - graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type + graph1->set_symbol(JKQTPFilledStar); // set symbol style + graph1->set_yErrorStyle(JKQTPErrorBars); // set error indicator type graph1->set_drawLine(false); // don't draw a line graph1->set_title(QObject::tr("sine graph")); diff --git a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp index f474570aa1..049a0de895 100644 --- a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_symbols_and_errors.cpp - * JKQtPlotter: Examples: Simple line-graph with error bars + * JKQTPLotter: Examples: Simple line-graph with error bars * - * \ref JKQtPlotterSymbolsErrors + * \ref JKQTPLotterSymbolsErrors */ #include @@ -16,8 +16,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for a simple plot (a sine curve with lin. increasing errors) double X[Ndata], Y[Ndata], YERROR[Ndata]; @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) YERROR[i]=0.2+double(i)/double(Ndata)*0.25; } - // 3. make data available to JKQtPlotter by adding it to the internal datastore. + // 3. make data available to JKQTPLotter by adding it to the internal datastore. // Note: In this step the data is copied (of not specified otherwise), so you can // reuse X and Y afterwards! // the variables columnX and columnY will contain the internal column ID of the newly @@ -37,12 +37,12 @@ int main(int argc, char* argv[]) size_t columnYE=ds->addCopiedColumn(YERROR, Ndata, "y-error"); // 4. create a graph in the plot, which plots the dataset X/Y: - JKQTPxyLineErrorGraph* graph1=new JKQTPxyLineErrorGraph(&plot); + JKQTPXYLineErrorGraph* graph1=new JKQTPXYLineErrorGraph(&plot); graph1->set_xColumn(columnX); graph1->set_yColumn(columnY); graph1->set_yErrorColumn(columnYE); - graph1->set_symbol(JKQTPfilledStar); // set symbol style - graph1->set_yErrorStyle(JKQTPerrorBars); // set error indicator type + graph1->set_symbol(JKQTPFilledStar); // set symbol style + graph1->set_yErrorStyle(JKQTPErrorBars); // set error indicator type graph1->set_drawLine(false); // don't draw a line graph1->set_title(QObject::tr("sine graph")); diff --git a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro index 92c64b2275..7e9c9d021a 100644 --- a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_symbols_and_errors -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_symbols_and_styles/README.md b/examples/simpletest_symbols_and_styles/README.md index c1fabcf81b..58eb78a701 100644 --- a/examples/simpletest_symbols_and_styles/README.md +++ b/examples/simpletest_symbols_and_styles/README.md @@ -1,26 +1,26 @@ -# Example (JKQtPlotter): Line Graph with Different Symbols and Line Styles {#JKQtPlotterSymbolsAndStyles} -This project (see `./examples/simpletest_symbols_and_styles/`) simply creates a JKQtPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. +# Example (JKQTPLotter): Line Graph with Different Symbols and Line Styles {#JKQTPLotterSymbolsAndStyles} +This project (see `./examples/simpletest_symbols_and_styles/`) simply creates a JKQTPLotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector objects. The source code of the main application can be found in [`jkqtplotter_simpletest_symbols_and_styles.cpp`](../simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp). Mainly several graphs are generated in a loop and then different symbol and line styles are applied to the graph (set by `graph->set_symbol()` for the symbol and `graph->set_style()` for the line style). The colors are set automtically from an internal default palette. The main loop looks like this: ```.cpp QVector pens {Qt::NoPen, Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; int ipen=0; - for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { + for (int symbolID=0; symbolID<=JKQTPMaxSymbolID; symbolID++) { // generate some plot data QVector Y; for (auto& xx: X) { Y<(symbolID)*1.5; } - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph=new JKQTPXYLineGraph(&plot); // copy data into datastore and immediately set the yColumn graph->set_xColumn(columnX); graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); // set symbol + pen style and color - graph->set_symbol(static_cast(symbolID)); + graph->set_symbol(static_cast(symbolID)); graph->set_style(pens[ipen]); // set symbol size graph->set_symbolSize(14); @@ -30,7 +30,7 @@ The source code of the main application can be found in [`jkqtplotter_simpletes graph->set_lineWidth(1); // graph title is made from symbol+penstyle - graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+JKQTP_QPenStyle2String(graph->get_style())); + graph->set_title(JKQTPGraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+jkqtp_QPenStyle2String(graph->get_style())); // add the graph to the plot, so it is actually displayed plot.addGraph(graph); diff --git a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp index d54e59bb30..a5b736b582 100644 --- a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp @@ -1,7 +1,7 @@ /** \example jkqtplotter_simpletest_symbols_and_styles.cpp - * JKQtPlotter: Examples: Line Graph with Different Symbols and Line Styles + * JKQTPLotter: Examples: Line Graph with Different Symbols and Line Styles * - * \ref JKQtPlotterSymbolsAndStyles + * \ref JKQTPLotterSymbolsAndStyles */ #include @@ -15,8 +15,8 @@ int main(int argc, char* argv[]) QApplication app(argc, argv); // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - JKQtPlotter plot; - JKQTPdatastore* ds=plot.getDatastore(); + JKQTPLotter plot; + JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data a vector of x-values for a simple plot (a sine curve) QVector X; @@ -34,24 +34,24 @@ int main(int argc, char* argv[]) // pen styles from the vector pens QVector pens {Qt::SolidLine, Qt::DashLine, Qt::DotLine, Qt::DashDotLine, Qt::DashDotDotLine }; int ipen=0; - for (int symbolID=0; symbolID<=JKQTPmaxSymbolID; symbolID++) { + for (int symbolID=0; symbolID<=JKQTPMaxSymbolID; symbolID++) { // generate some plot data QVector Y; for (auto& xx: X) { Y<(symbolID)*1.5; } - JKQTPxyLineGraph* graph=new JKQTPxyLineGraph(&plot); + JKQTPXYLineGraph* graph=new JKQTPXYLineGraph(&plot); // copy data into datastore and immediately set the yColumn graph->set_xColumn(columnX); graph->set_yColumn(ds->addCopiedColumn(Y, "y"+QString::number(symbolID))); // set symbol + pen style and color - graph->set_symbol(static_cast(symbolID)); + graph->set_symbol(static_cast(symbolID)); graph->set_style(pens[ipen]); - QString lname=JKQTP_QPenStyle2String(graph->get_style()); - graph->set_drawLine(static_cast(symbolID)!=JKQTPdot); + QString lname=jkqtp_QPenStyle2String(graph->get_style()); + graph->set_drawLine(static_cast(symbolID)!=JKQTPDot); if (!graph->get_drawLine()) lname=""; // set symbol size graph->set_symbolSize(14); @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) graph->set_lineWidth(1); // graph title is made from symbol+penstyle - graph->set_title(JKQTPgraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+lname); + graph->set_title(JKQTPGraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+lname); // add the graph to the plot, so it is actually displayed plot.addGraph(graph); diff --git a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro index c58c47de10..cbc7b95521 100644 --- a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = jkqtplotter_simpletest_symbols_and_styles -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/simpletest_ui/README.md b/examples/simpletest_ui/README.md index 564bfaf45d..bc498e104f 100644 --- a/examples/simpletest_ui/README.md +++ b/examples/simpletest_ui/README.md @@ -1,18 +1,18 @@ -# Tutorial (JKQtPlotter): Using a JKQtPlotter inside a Qt User Interface Designer (UI) File {#JKQtPlotterQtCreator} -This project (see `./examples/simpletest_ui/`) demonstrates how to create add a `JKQtPlotter` inside the Qt Form Editor (e.g. called from of Qt Creator) into a widget. +# Tutorial (JKQTPLotter): Using a JKQTPLotter inside a Qt User Interface Designer (UI) File {#JKQTPLotterQtCreator} +This project (see `./examples/simpletest_ui/`) demonstrates how to create add a `JKQTPLotter` inside the Qt Form Editor (e.g. called from of Qt Creator) into a widget. -## Instructions on how to use JKQtPlotter in the Qt Form Designer +## Instructions on how to use JKQTPLotter in the Qt Form Designer For this to work you have to follow the steps shown below: 1. add a new UI-file to your project and open it in the Form Editor. Then right-click the form and select `Promote Widgets ...`:
- ![step1](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/uidesigner_step1.png) + ![step1](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/doc/images/uidesigner_step1.png) -2. In the dialog that opens, you have to define `JKQtPlotter` as a promotion to `QWidget` as shown below. Finally store the settings by clicking `Add` and closing the dialog with `Close`.
- ![step2](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/uidesigner_step2.png) +2. In the dialog that opens, you have to define `JKQTPLotter` as a promotion to `QWidget` as shown below. Finally store the settings by clicking `Add` and closing the dialog with `Close`.
+ ![step2](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/doc/images/uidesigner_step2.png) -3. Now you can add a `QWidget`from the side-bar to the form and then promote it to `JKQtPlotter`, by selecting and right-clicking the `QWidget` and then selecting `Promote To | JKQtPlotter`:
- ![step3](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/uidesigner_step3.png) +3. Now you can add a `QWidget`from the side-bar to the form and then promote it to `JKQTPLotter`, by selecting and right-clicking the `QWidget` and then selecting `Promote To | JKQTPLotter`:
+ ![step3](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/doc/images/uidesigner_step3.png) @@ -36,7 +36,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_ui -# include JKQtPlotter source headers and link against library +# include JKQTPLotter source headers and link against library DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { @@ -55,7 +55,7 @@ win32-msvc*: DEFINES += _USE_MATH_DEFINES As you can see there is a main CPP-file (shown below) and a `formwithjkqtplotter.ui`-file with the `formwithjkqtplotter.cpp/.h`-files that are used to implement the functionality behind the form (see next chapter). -The soruce code of the main application is simply instanciating the Form class `FormWithJKQtPlotter` from `formwithjkqtplotter.ui/.h/.cpp`: +The soruce code of the main application is simply instanciating the Form class `FormWithJKQTPLotter` from `formwithjkqtplotter.ui/.h/.cpp`: ```.cpp #include #include "formwithjkqtplotter.h" @@ -65,7 +65,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - FormWithJKQtPlotter plot; + FormWithJKQTPLotter plot; plot.show(); plot.resize(600,400); @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) } ``` -## Form Class `FormWithJKQtPlotter` +## Form Class `FormWithJKQTPLotter` The Form was designed in the Qt Form Designer within Qt Creator, using the method described above (see `formwithjkqtplotter.ui`): @@ -84,12 +84,12 @@ In addition the example implements some simple functionality in the `formwithjkq #include "formwithjkqtplotter.h" #include "ui_formwithjkqtplotter.h" -FormWithJKQtPlotter::FormWithJKQtPlotter(QWidget *parent) : +FormWithJKQTPLotter::FormWithJKQTPLotter(QWidget *parent) : QWidget(parent), - ui(new Ui::FormWithJKQtPlotter) + ui(new Ui::FormWithJKQTPLotter) { ui->setupUi(this); - graph=new JKQTPxParsedFunctionLineGraph(ui->plot); + graph=new JKQTPXParsedFunctionLineGraph(ui->plot); graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); ui->plot->addGraph(graph); @@ -99,7 +99,7 @@ FormWithJKQtPlotter::FormWithJKQtPlotter(QWidget *parent) : Then three slots react to user interactions. First two interactions set the x- or y-axis to linear or logarithmic, depending on the state of the two check-boxes. It also sets the scaling of the axes to meaningful default values: ```.cpp -void FormWithJKQtPlotter::on_chkLogX_toggled(bool checked) +void FormWithJKQTPLotter::on_chkLogX_toggled(bool checked) { ui->plot->get_xAxis()->set_logAxis(checked); if (checked) { @@ -109,7 +109,7 @@ void FormWithJKQtPlotter::on_chkLogX_toggled(bool checked) } } -void FormWithJKQtPlotter::on_chkLogY_toggled(bool checked) +void FormWithJKQTPLotter::on_chkLogY_toggled(bool checked) { ui->plot->get_yAxis()->set_logAxis(checked); if (checked) { @@ -122,7 +122,7 @@ void FormWithJKQtPlotter::on_chkLogY_toggled(bool checked) A third slot is connected to the `clicked()`-event of the `QPushButton` labeled "REPLOT!". This slot reads the function from the `QLineEdit` and updates the plot with it: ```.cpp -void FormWithJKQtPlotter::on_btnReplot_clicked() +void FormWithJKQTPLotter::on_btnReplot_clicked() { graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); diff --git a/examples/simpletest_ui/formwithjkqtplotter.cpp b/examples/simpletest_ui/formwithjkqtplotter.cpp index 00425052c9..9136e78831 100644 --- a/examples/simpletest_ui/formwithjkqtplotter.cpp +++ b/examples/simpletest_ui/formwithjkqtplotter.cpp @@ -1,30 +1,30 @@ /** \example formwithjkqtplotter.cpp - * JKQtPlotter: Examples: Using a JKQtPlotter inside a Qt User Interface Designer (UI) File + * JKQTPLotter: Examples: Using a JKQTPLotter inside a Qt User Interface Designer (UI) File * - * \ref JKQtPlotterQtCreator + * \ref JKQTPLotterQtCreator */ #include "formwithjkqtplotter.h" #include "ui_formwithjkqtplotter.h" -FormWithJKQtPlotter::FormWithJKQtPlotter(QWidget *parent) : +FormWithJKQTPLotter::FormWithJKQTPLotter(QWidget *parent) : QWidget(parent), - ui(new Ui::FormWithJKQtPlotter) + ui(new Ui::FormWithJKQTPLotter) { ui->setupUi(this); - graph=new JKQTPxParsedFunctionLineGraph(ui->plot); + graph=new JKQTPXParsedFunctionLineGraph(ui->plot); graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); ui->plot->addGraph(graph); ui->plot->setXY(-10,10,-10,10); } -FormWithJKQtPlotter::~FormWithJKQtPlotter() +FormWithJKQTPLotter::~FormWithJKQTPLotter() { delete ui; } -void FormWithJKQtPlotter::on_chkLogX_toggled(bool checked) +void FormWithJKQTPLotter::on_chkLogX_toggled(bool checked) { ui->plot->get_xAxis()->set_logAxis(checked); if (checked) { @@ -34,7 +34,7 @@ void FormWithJKQtPlotter::on_chkLogX_toggled(bool checked) } } -void FormWithJKQtPlotter::on_chkLogY_toggled(bool checked) +void FormWithJKQTPLotter::on_chkLogY_toggled(bool checked) { ui->plot->get_yAxis()->set_logAxis(checked); if (checked) { @@ -44,7 +44,7 @@ void FormWithJKQtPlotter::on_chkLogY_toggled(bool checked) } } -void FormWithJKQtPlotter::on_btnReplot_clicked() +void FormWithJKQTPLotter::on_btnReplot_clicked() { graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); diff --git a/examples/simpletest_ui/formwithjkqtplotter.h b/examples/simpletest_ui/formwithjkqtplotter.h index 08577b2336..16f78ccacb 100644 --- a/examples/simpletest_ui/formwithjkqtplotter.h +++ b/examples/simpletest_ui/formwithjkqtplotter.h @@ -5,25 +5,25 @@ #include "jkqtplotter/jkqtpgraphsparsedfunction.h" namespace Ui { - class FormWithJKQtPlotter; + class FormWithJKQTPLotter; } -class FormWithJKQtPlotter : public QWidget +class FormWithJKQTPLotter : public QWidget { Q_OBJECT public: - explicit FormWithJKQtPlotter(QWidget *parent = nullptr); - ~FormWithJKQtPlotter(); + explicit FormWithJKQTPLotter(QWidget *parent = nullptr); + ~FormWithJKQTPLotter(); protected slots: void on_chkLogX_toggled(bool checked); void on_chkLogY_toggled(bool checked); void on_btnReplot_clicked(); private: - Ui::FormWithJKQtPlotter *ui; + Ui::FormWithJKQTPLotter *ui; - JKQTPxParsedFunctionLineGraph* graph; + JKQTPXParsedFunctionLineGraph* graph; }; #endif // FORMWITHJKQTPLOTTER_H diff --git a/examples/simpletest_ui/formwithjkqtplotter.ui b/examples/simpletest_ui/formwithjkqtplotter.ui index 18151477f6..6387c2cd1a 100644 --- a/examples/simpletest_ui/formwithjkqtplotter.ui +++ b/examples/simpletest_ui/formwithjkqtplotter.ui @@ -1,7 +1,7 @@ - FormWithJKQtPlotter - + FormWithJKQTPLotter + 0 @@ -36,7 +36,7 @@
- + @@ -63,7 +63,7 @@ - JKQtPlotter + JKQTPLotter QWidget
jkqtplotter/jkqtplotter.h
1 diff --git a/examples/simpletest_ui/jkqtplotter_simpletest_ui.cpp b/examples/simpletest_ui/jkqtplotter_simpletest_ui.cpp index 07350fec17..f07431eda7 100644 --- a/examples/simpletest_ui/jkqtplotter_simpletest_ui.cpp +++ b/examples/simpletest_ui/jkqtplotter_simpletest_ui.cpp @@ -6,7 +6,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - FormWithJKQtPlotter plot; + FormWithJKQTPLotter plot; plot.show(); plot.resize(600,400); diff --git a/examples/simpletest_ui/jkqtplotter_simpletest_ui.pro b/examples/simpletest_ui/jkqtplotter_simpletest_ui.pro index 75d5fcdfe5..f4f5da2252 100644 --- a/examples/simpletest_ui/jkqtplotter_simpletest_ui.pro +++ b/examples/simpletest_ui/jkqtplotter_simpletest_ui.pro @@ -14,7 +14,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport # output executable name TARGET = jkqtplotter_simpletest_ui -# include JKQtPlotter source headers and link against library +# include JKQTPLotter source headers and link against library DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/examples/test_multiplot/README.md b/examples/test_multiplot/README.md index bae0388e9f..0459c4ca46 100644 --- a/examples/test_multiplot/README.md +++ b/examples/test_multiplot/README.md @@ -1,5 +1,5 @@ -# Example (JKQtPlotter): Laying out Several Plots {#JKQtPlotterMultiPlotLayout} -This project (see `./examples/test_multiplot/`) shows how several JKQtPlotter widgets can be combined to in a layout (based on the [Qt layouting system](http://doc.qt.io/qt-5/layout.html)). It also shows how axes in such a layout can be linked to improve user experience. +# Example (JKQTPLotter): Laying out Several Plots {#JKQTPLotterMultiPlotLayout} +This project (see `./examples/test_multiplot/`) shows how several JKQTPLotter widgets can be combined to in a layout (based on the [Qt layouting system](http://doc.qt.io/qt-5/layout.html)). It also shows how axes in such a layout can be linked to improve user experience. The source code of the main application can be found in [`test_multiplot.cpp`](../test_multiplot/test_multiplot.cpp). @@ -8,23 +8,23 @@ First three plots are generated and put into a [QGridLayout](http://doc.qt.io/qt ```.cpp // 1. create a widget QWidget mainWidget; - mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); + mainWidget.setWindowTitle("JKQTPLotter(s) in a QGridLayout"); // 2. Create a QGridLayout for the plots and add it to the widget. QGridLayout* layout=new QGridLayout(); mainWidget.setLayout(layout); // 3.1 create a main plotter widget and add it to the layout - JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); + JKQTPLotter* plotMain=new JKQTPLotter(&mainWidget); layout->addWidget(plotMain, 0,0); - JKQTPdatastore* ds=plotMain->getDatastore(); + JKQTPDatastore* ds=plotMain->getDatastore(); // 3.2 create a second and third plotter widget and add them to the // layout below and at the bottom right of the plotMain. // Also configure it to use the same datastore as plotMain - JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); + JKQTPLotter* plotResid=new JKQTPLotter(false, &mainWidget, ds); layout->addWidget(plotResid, 1,0); - JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); + JKQTPLotter* plotResidHist=new JKQTPLotter(false, &mainWidget, ds); layout->addWidget(plotResidHist, 1,1); // 3.3 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot @@ -94,7 +94,7 @@ The result looks like this: ![test_multiplot](../../screenshots/test_multiplot.png) -You push the print button (![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/lib/jkqtplotterressources/images/jkqtp_24_print.png)) to open a print preview dialog, which will give an impression of how the three plots will be arranged in a printout: +You push the print button (![test_multiplot](https://raw.githubusercontent.com/jkriege2/JKQTPLotter/master/lib/jkqtplotterressources/images/jkqtp_24_print.png)) to open a print preview dialog, which will give an impression of how the three plots will be arranged in a printout: ![test_multiplot](../../screenshots/test_multiplot_printpreview.png) diff --git a/examples/test_multiplot/test_multiplot.cpp b/examples/test_multiplot/test_multiplot.cpp index 7c27e97ad9..81cc7d25ad 100644 --- a/examples/test_multiplot/test_multiplot.cpp +++ b/examples/test_multiplot/test_multiplot.cpp @@ -1,7 +1,7 @@ /** \example test_multiplot.cpp - * JKQtPlotter: Examples: Laying out Several Plots + * JKQTPLotter: Examples: Laying out Several Plots * - * \ref JKQtPlotterMultiPlotLayout + * \ref JKQTPLotterMultiPlotLayout */ #include @@ -18,23 +18,23 @@ int main(int argc, char* argv[]) // 1. create a widget QWidget mainWidget; - mainWidget.setWindowTitle("JKQtPlotter(s) in a QGridLayout"); + mainWidget.setWindowTitle("JKQTPLotter(s) in a QGridLayout"); // 2. Create a QGridLayout for the plots and add it to the widget. QGridLayout* layout=new QGridLayout(); mainWidget.setLayout(layout); // 3.1 create a main plotter widget and add it to the layout - JKQtPlotter* plotMain=new JKQtPlotter(&mainWidget); + JKQTPLotter* plotMain=new JKQTPLotter(&mainWidget); layout->addWidget(plotMain, 0,0); - JKQTPdatastore* ds=plotMain->getDatastore(); + JKQTPDatastore* ds=plotMain->getDatastore(); // 3.2 create a second and third plotter widget and add them to the // layout below and at the bottom right of the plotMain. // Also configure it to use the same datastore as plotMain - JKQtPlotter* plotResid=new JKQtPlotter(false, &mainWidget, ds); + JKQTPLotter* plotResid=new JKQTPLotter(false, &mainWidget, ds); layout->addWidget(plotResid, 1,0); - JKQtPlotter* plotResidHist=new JKQtPlotter(false, &mainWidget, ds); + JKQTPLotter* plotResidHist=new JKQTPLotter(false, &mainWidget, ds); layout->addWidget(plotResidHist, 1,1); // 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain @@ -90,27 +90,27 @@ int main(int argc, char* argv[]) std::pair cH=ds->addCopiedMap(histogram, "histX", "histY"); // 5.1 plot of the data - JKQTPxyLineGraph* graphD=new JKQTPxyLineGraph(plotMain); + JKQTPXYLineGraph* graphD=new JKQTPXYLineGraph(plotMain); graphD->set_xColumn(cX); graphD->set_yColumn(cY); graphD->set_drawLine(false); - graphD->set_symbol(JKQTPcross); + graphD->set_symbol(JKQTPCross); graphD->set_symbolSize(10); graphD->set_title("measurement data"); plotMain->addGraph(graphD); // 5.2 plot of the graph as an interpreted function, set as string "2*(1+cos(x))" - JKQTPxParsedFunctionLineGraph* graphFit=new JKQTPxParsedFunctionLineGraph(plotMain); + JKQTPXParsedFunctionLineGraph* graphFit=new JKQTPXParsedFunctionLineGraph(plotMain); graphFit->set_function("2*(1+cos(x))"); graphFit->set_title("fit"); plotMain->addGraph(graphFit); // 5.3 residuals plot - JKQTPxyLineGraph* graphResid=new JKQTPxyLineGraph(plotResid); + JKQTPXYLineGraph* graphResid=new JKQTPXYLineGraph(plotResid); graphResid->set_xColumn(cX); graphResid->set_yColumn(cRY); graphResid->set_drawLine(false); - graphResid->set_symbol(JKQTPplus); + graphResid->set_symbol(JKQTPPlus); graphResid->set_symbolSize(10); graphResid->set_drawLine(true); graphResid->set_lineWidth(0.5); @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) plotResid->addGraph(graphResid); // 5.3 residual histogram plot - JKQTPbarHorizontalGraph* graphResidHist=new JKQTPbarHorizontalGraph(plotResidHist); + JKQTPBarHorizontalGraph* graphResidHist=new JKQTPBarHorizontalGraph(plotResidHist); graphResidHist->set_xColumn(cH.second); graphResidHist->set_yColumn(cH.first); graphResidHist->set_title("histogram"); diff --git a/examples/test_multiplot/test_multiplot.pro b/examples/test_multiplot/test_multiplot.pro index 445bb1fa07..6ad1941235 100644 --- a/examples/test_multiplot/test_multiplot.pro +++ b/examples/test_multiplot/test_multiplot.pro @@ -10,7 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = test_multiplot -# include JKQtPlotter source code +# include JKQTPLotter source code DEPENDPATH += . ../../lib INCLUDEPATH += ../../lib CONFIG (debug, debug|release) { diff --git a/lib/README.md b/lib/README.md index 9fd563216b..9eec5434b1 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,16 +1,16 @@ -# JKQtPlotter: LIB subdirectory +# JKQTPLotter: LIB subdirectory -This directory contains all files that belong to the JKQtPlotter library (including the files of the JKQtFastPlotter and JKMathText). There are several ways to add these to your program: +This directory contains all files that belong to the JKQTPLotter library (including the files of the JKQTFastPlotter and JKMathText). There are several ways to add these to your program: ### simply include all necessary files If you use QMake and simply want to include all necessary files into your project, include one of these `PRI`-files into your QMake Project: -- `jkqtplotter.pri` contains all files in this library, including `JKQtFastPlotter` and `JKQTmathText` -- `jkqtfastplotter.pri` contains only those files from this directory which are necessary to build `JKQtFastPlotter` -- `jkqtmathtext.pri` contains only those files from this directory which are necessary to build `JKQTmathText` +- `jkqtplotter.pri` contains all files in this library, including `JKQTFastPlotter` and `JKQTMathText` +- `jkqtfastplotter.pri` contains only those files from this directory which are necessary to build `JKQTFastPlotter` +- `jkqtmathtext.pri` contains only those files from this directory which are necessary to build `JKQTMathText` ### Build static libraries -In the directory [`../staticlib`](../staticlib) you will find several Project files that build a static library of the full JKQtPlotter (including JKQtFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. +In the directory [`../staticlib`](../staticlib) you will find several Project files that build a static library of the full JKQTPLotter (including JKQTFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. ### Build shared libraries (DLLs, SOs, ...) -In the directory [`../sharedlib`](../sharedlib) you will find several Project files that build a dynamic shared library of the full JKQtPlotter (including JKQtFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. +In the directory [`../sharedlib`](../sharedlib) you will find several Project files that build a dynamic shared library of the full JKQTPLotter (including JKQTFastPlotter and JKMathText), or of subsets of this library. You can then link against these libs in your project. diff --git a/lib/jkqtfastplotter/jkqtfastplotter.h b/lib/jkqtfastplotter/jkqtfastplotter.h index 830c0baf07..d07bf18b47 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.h +++ b/lib/jkqtfastplotter/jkqtfastplotter.h @@ -69,7 +69,7 @@ class JKQTFPPlot; /*! \brief a speed optimized plotter class \ingroup jkqtfastplotter - This plotter class is (in contrast to JKQTPlotter) optimized for speed. It allows to plot function graphs/data in + This plotter class is (in contrast to JKQTPLotter) optimized for speed. It allows to plot function graphs/data in a simple manner. The focus of design was not on a nice output (athough this is not unimportant), but on the speed of the output. So the class may be used to di quick plotting of data, i.e. in fast image sequence applications. diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index 6aad1e9f1d..4142363f1d 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -25,7 +25,7 @@ #include #include #include -//#define JKQTP_QColor2String(color) QString(jkqtp_rgbtostring((color).red(), (color).green(), (color).blue(), (color).alpha()).c_str()) +//#define jkqtp_QColor2String(color) QString(jkqtp_rgbtostring((color).red(), (color).green(), (color).blue(), (color).alpha()).c_str()) /** * \brief saves the given property (for which also a def_property exists) into the given settings object @@ -121,7 +121,7 @@ QPainterPath makeDArrow(double x, double y, double width, double arrowW, bool le // -- implementation of the MTnode's methods // -------------------------------------------------------------------------------------------------- -JKQTmathText::MTenvironment::MTenvironment() { +JKQTMathText::MTenvironment::MTenvironment() { color=QColor("black"); font=MTEroman; fontSize=10; @@ -134,7 +134,7 @@ JKQTmathText::MTenvironment::MTenvironment() { insideMath=false; } -QFont JKQTmathText::MTenvironment::getFont(JKQTmathText* parent) const { +QFont JKQTMathText::MTenvironment::getFont(JKQTMathText* parent) const { QFont f; switch (font) { case MTEsans: @@ -162,7 +162,7 @@ QFont JKQTmathText::MTenvironment::getFont(JKQTmathText* parent) const { return f; } -QString JKQTmathText::MTenvironment::toHtmlStart(MTenvironment defaultEv) const { +QString JKQTMathText::MTenvironment::toHtmlStart(MTenvironment defaultEv) const { QString s; s=s+"font-size: "+QLocale::c().toString(fontSize)+"pt; "; if (insideMath) { @@ -185,21 +185,21 @@ QString JKQTmathText::MTenvironment::toHtmlStart(MTenvironment defaultEv) const return ""; } -QString JKQTmathText::MTenvironment::toHtmlAfter(JKQTmathText::MTenvironment /*defaultEv*/) const { +QString JKQTMathText::MTenvironment::toHtmlAfter(JKQTMathText::MTenvironment /*defaultEv*/) const { return ""; } -JKQTmathText::MTnode::MTnode(JKQTmathText* parent) { +JKQTMathText::MTnode::MTnode(JKQTMathText* parent) { this->parent=parent; drawBoxes=false; } -JKQTmathText::MTnode::~MTnode() +JKQTMathText::MTnode::~MTnode() { } -void JKQTmathText::MTnode::getSize(QPainter &painter, JKQTmathText::MTenvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos) +void JKQTMathText::MTnode::getSize(QPainter &painter, JKQTMathText::MTenvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos) { double w=width, b=baselineHeight, o=overallHeight, s=strikeoutPos; getSizeInternal(painter, currentEv, w, b, o, s); @@ -210,12 +210,12 @@ void JKQTmathText::MTnode::getSize(QPainter &painter, JKQTmathText::MTenvironmen if (s<1e5) strikeoutPos=s; } -bool JKQTmathText::MTnode::toHtml(QString &/*html*/, JKQTmathText::MTenvironment /*currentEv*/, JKQTmathText::MTenvironment /*defaultEv*/) { +bool JKQTMathText::MTnode::toHtml(QString &/*html*/, JKQTMathText::MTenvironment /*currentEv*/, JKQTMathText::MTenvironment /*defaultEv*/) { return false; } -void JKQTmathText::MTnode::doDrawBoxes(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +void JKQTMathText::MTnode::doDrawBoxes(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { if (drawBoxes) { painter.save(); double w, oh, bh, sp; @@ -241,8 +241,8 @@ void JKQTmathText::MTnode::doDrawBoxes(QPainter& painter, double x, double y, JK } -JKQTmathText::MTtextNode::MTtextNode(JKQTmathText* parent, QString textIn, bool addWhitespace, bool stripInnerWhitepace): - JKQTmathText::MTnode(parent) +JKQTMathText::MTtextNode::MTtextNode(JKQTMathText* parent, QString textIn, bool addWhitespace, bool stripInnerWhitepace): + JKQTMathText::MTnode(parent) { QString text=textIn; @@ -262,10 +262,10 @@ JKQTmathText::MTtextNode::MTtextNode(JKQTmathText* parent, QString textIn, bool //qDebug()<<"MTtextNode( text="< this->text="<text<<"]"; } -JKQTmathText::MTtextNode::~MTtextNode() { +JKQTMathText::MTtextNode::~MTtextNode() { } -void JKQTmathText::MTtextNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTtextNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { QFont f=currentEv.getFont(parent); if (currentEv.insideMath && (text=="(" || text=="[" || text=="|" || text=="]" || text==")" || text=="<" || text==">" || text==QString(QChar(0x2329)) || text==QString(QChar(0x232A)) || text==QString(QChar(0x2308)) || @@ -295,7 +295,7 @@ void JKQTmathText::MTtextNode::getSizeInternal(QPainter& painter, JKQTmathText:: strikeoutPos=fm.strikeOutPos()*1.1; } -double JKQTmathText::MTtextNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTtextNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); double width=0; double baselineHeight=0; @@ -371,17 +371,17 @@ double JKQTmathText::MTtextNode::draw(QPainter& painter, double x, double y, JKQ return x+width; } -bool JKQTmathText::MTtextNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { +bool JKQTMathText::MTtextNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { html=html+currentEv.toHtmlStart(defaultEv)+text+currentEv.toHtmlAfter(defaultEv); return true; } -QString JKQTmathText::MTtextNode::getTypeName() const +QString JKQTMathText::MTtextNode::getTypeName() const { return QLatin1String("MTtextNode(")+text+")"; } -QString JKQTmathText::MTtextNode::textTransform(const QString &text, JKQTmathText::MTenvironment currentEv, bool /*forSize*/) +QString JKQTMathText::MTtextNode::textTransform(const QString &text, JKQTMathText::MTenvironment currentEv, bool /*forSize*/) { QString txt=text; if (parent->get_fontEncoding()==MTFEunicode) { @@ -459,30 +459,30 @@ QString JKQTmathText::MTtextNode::textTransform(const QString &text, JKQTmathTex -JKQTmathText::MTinstruction1Node::MTinstruction1Node(JKQTmathText* parent, QString name, MTnode* child, const QStringList& parameters): - JKQTmathText::MTnode(parent) +JKQTMathText::MTinstruction1Node::MTinstruction1Node(JKQTMathText* parent, QString name, MTnode* child, const QStringList& parameters): + JKQTMathText::MTnode(parent) { this->name=name; this->child=child; this->parameters=parameters; - JKQTmathText::MTenvironment ev; + JKQTMathText::MTenvironment ev; if (!setupMTenvironment(ev)) { parent->error_list.append(tr("unknown instruction '%1' found!").arg(name)); } } -JKQTmathText::MTinstruction1Node::~MTinstruction1Node() { +JKQTMathText::MTinstruction1Node::~MTinstruction1Node() { if (child!=nullptr) delete child; } -QString JKQTmathText::MTinstruction1Node::getTypeName() const +QString JKQTMathText::MTinstruction1Node::getTypeName() const { return QLatin1String("MTinstruction1Node(")+name+")"; } -void JKQTmathText::MTinstruction1Node::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { - JKQTmathText::MTenvironment ev=currentEv; +void JKQTMathText::MTinstruction1Node::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { + JKQTMathText::MTenvironment ev=currentEv; setupMTenvironment(ev); @@ -496,9 +496,9 @@ void JKQTmathText::MTinstruction1Node::getSizeInternal(QPainter& painter, JKQTma } } -double JKQTmathText::MTinstruction1Node::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTinstruction1Node::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); - JKQTmathText::MTenvironment ev=currentEv; + JKQTMathText::MTenvironment ev=currentEv; setupMTenvironment(ev); @@ -524,21 +524,21 @@ double JKQTmathText::MTinstruction1Node::draw(QPainter& painter, double x, doubl return xnew; } -bool JKQTmathText::MTinstruction1Node::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { - JKQTmathText::MTenvironment ev=currentEv; +bool JKQTMathText::MTinstruction1Node::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { + JKQTMathText::MTenvironment ev=currentEv; setupMTenvironment(ev); return child->toHtml(html, ev, defaultEv); } -void JKQTmathText::MTinstruction1Node::set_drawBoxes(bool draw) +void JKQTMathText::MTinstruction1Node::set_drawBoxes(bool draw) { drawBoxes=draw; child->set_drawBoxes(draw); } -bool JKQTmathText::MTinstruction1Node::setupMTenvironment(JKQTmathText::MTenvironment &ev) +bool JKQTMathText::MTinstruction1Node::setupMTenvironment(JKQTMathText::MTenvironment &ev) { if (name=="bf" || name=="textbf" || name=="mathbf") ev.bold=true; else if (name=="em") ev.italic=!ev.italic; @@ -549,14 +549,14 @@ bool JKQTmathText::MTinstruction1Node::setupMTenvironment(JKQTmathText::MTenviro else if (name=="ul" || name=="underline" || name=="underlined") ev.underlined=true; else if (name=="ol" || name=="overline" || name=="overlined") ev.overline=true; else if (name=="strike") ev.strike=true; - else if (name=="rm" || name=="textrm") { ev.font=JKQTmathText::MTEroman; } - else if (name=="mathrm" || name=="text" || name=="mbox" || name=="operatorname") { ev.font=JKQTmathText::MTEroman; ev.italic=false; } - else if (name=="mat") { ev.font=JKQTmathText::MTEroman; ev.italic=false; ev.bold=true; } - else if (name=="cal" || name=="textcal" || name=="mathcal") { ev.font=JKQTmathText::MTEcaligraphic; } - else if (name=="bb" || name=="textbb" || name=="mathbb") { ev.font=JKQTmathText::MTEblackboard; } - else if (name=="tt" || name=="texttt" || name=="mathtt") { ev.font=JKQTmathText::MTEtypewriter; } - else if (name=="sf" || name=="textsf" || name=="mathsf") { ev.font=JKQTmathText::MTEsans; } - else if (name=="script" || name=="textscript" || name=="mathscript") { ev.font=JKQTmathText::MTEscript; } + else if (name=="rm" || name=="textrm") { ev.font=JKQTMathText::MTEroman; } + else if (name=="mathrm" || name=="text" || name=="mbox" || name=="operatorname") { ev.font=JKQTMathText::MTEroman; ev.italic=false; } + else if (name=="mat") { ev.font=JKQTMathText::MTEroman; ev.italic=false; ev.bold=true; } + else if (name=="cal" || name=="textcal" || name=="mathcal") { ev.font=JKQTMathText::MTEcaligraphic; } + else if (name=="bb" || name=="textbb" || name=="mathbb") { ev.font=JKQTMathText::MTEblackboard; } + else if (name=="tt" || name=="texttt" || name=="mathtt") { ev.font=JKQTMathText::MTEtypewriter; } + else if (name=="sf" || name=="textsf" || name=="mathsf") { ev.font=JKQTMathText::MTEsans; } + else if (name=="script" || name=="textscript" || name=="mathscript") { ev.font=JKQTMathText::MTEscript; } else if (name=="displaystyle") { ev.fontSize=ev.fontSize/0.8; } else if (name=="scriptstyle") { ev.fontSize=ev.fontSize*0.8; } else if (name=="scriptscriptstyle") { ev.fontSize=ev.fontSize*0.8*0.8; } @@ -570,18 +570,18 @@ bool JKQTmathText::MTinstruction1Node::setupMTenvironment(JKQTmathText::MTenviro -JKQTmathText::MTsubscriptNode::MTsubscriptNode(JKQTmathText* parent, MTnode* child): - JKQTmathText::MTnode(parent) +JKQTMathText::MTsubscriptNode::MTsubscriptNode(JKQTMathText* parent, MTnode* child): + JKQTMathText::MTnode(parent) { this->child=child; } -JKQTmathText::MTsubscriptNode::~MTsubscriptNode() { +JKQTMathText::MTsubscriptNode::~MTsubscriptNode() { if (child!=nullptr) delete child; } -void JKQTmathText::MTsubscriptNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { - JKQTmathText::MTenvironment ev=currentEv; +void JKQTMathText::MTsubscriptNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { + JKQTMathText::MTenvironment ev=currentEv; ev.fontSize=ev.fontSize*parent->get_subsuper_size_factor(); QFontMetricsF fm(ev.getFont(parent), painter.device()); @@ -597,9 +597,9 @@ void JKQTmathText::MTsubscriptNode::getSizeInternal(QPainter& painter, JKQTmathT if (currentEv.italic) width=width-double(fm.width(' '))*parent->get_italic_correction_factor(); } -double JKQTmathText::MTsubscriptNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTsubscriptNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); - JKQTmathText::MTenvironment ev=currentEv; + JKQTMathText::MTenvironment ev=currentEv; ev.fontSize=ev.fontSize*parent->get_subsuper_size_factor(); QFontMetricsF fm(ev.getFont(parent), painter.device()); @@ -610,25 +610,25 @@ double JKQTmathText::MTsubscriptNode::draw(QPainter& painter, double x, double y return child->draw(painter, xx, y+shift, ev);//+0.5*fm.boundingRect("A").width(); } -bool JKQTmathText::MTsubscriptNode::isSubOrSuper() +bool JKQTMathText::MTsubscriptNode::isSubOrSuper() { return true; } -QString JKQTmathText::MTsubscriptNode::getTypeName() const +QString JKQTMathText::MTsubscriptNode::getTypeName() const { return "MTsubscriptNode"; } -bool JKQTmathText::MTsubscriptNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { +bool JKQTMathText::MTsubscriptNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { html=html+""; bool ok=child->toHtml(html, currentEv, defaultEv); html=html+""; return ok; } -void JKQTmathText::MTsubscriptNode::set_drawBoxes(bool draw) +void JKQTMathText::MTsubscriptNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child->set_drawBoxes(draw); @@ -639,18 +639,18 @@ void JKQTmathText::MTsubscriptNode::set_drawBoxes(bool draw) -JKQTmathText::MTsqrtNode::MTsqrtNode(JKQTmathText* parent, MTnode* child, int degree): - JKQTmathText::MTnode(parent) +JKQTMathText::MTsqrtNode::MTsqrtNode(JKQTMathText* parent, MTnode* child, int degree): + JKQTMathText::MTnode(parent) { this->child=child; this->degree=degree; } -JKQTmathText::MTsqrtNode::~MTsqrtNode() { +JKQTMathText::MTsqrtNode::~MTsqrtNode() { if (child!=nullptr) delete child; } -void JKQTmathText::MTsqrtNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTsqrtNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { QFontMetricsF fm(currentEv.getFont(parent), painter.device()); child->getSize(painter, currentEv, width, baselineHeight, overallHeight, strikeoutPos); @@ -660,7 +660,7 @@ void JKQTmathText::MTsqrtNode::getSizeInternal(QPainter& painter, JKQTmathText:: width=width+fm.boundingRect("A").width()*2; // 1.53 } -double JKQTmathText::MTsqrtNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTsqrtNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); double width=0, baselineHeight=0, overallHeight=0, sp=0; child->getSize(painter, currentEv, width, baselineHeight, overallHeight, sp); @@ -701,21 +701,21 @@ double JKQTmathText::MTsqrtNode::draw(QPainter& painter, double x, double y, JKQ return xnew+0.33*w; } -bool JKQTmathText::MTsqrtNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { +bool JKQTMathText::MTsqrtNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { html=html+"√"; bool ok=child->toHtml(html, currentEv, defaultEv); html=html+" "; return ok; } -void JKQTmathText::MTsqrtNode::set_drawBoxes(bool draw) +void JKQTMathText::MTsqrtNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child->set_drawBoxes(draw); } -QString JKQTmathText::MTsqrtNode::getTypeName() const +QString JKQTMathText::MTsqrtNode::getTypeName() const { return "MTsqrtNode"; } @@ -725,28 +725,28 @@ QString JKQTmathText::MTsqrtNode::getTypeName() const -JKQTmathText::MTfracNode::MTfracNode(JKQTmathText* parent, MTnode* child_top, MTnode* child_bottom, MTfracMode mode): - JKQTmathText::MTnode(parent) +JKQTMathText::MTfracNode::MTfracNode(JKQTMathText* parent, MTnode* child_top, MTnode* child_bottom, MTfracMode mode): + JKQTMathText::MTnode(parent) { this->child1=child_top; this->child2=child_bottom; this->mode=mode; } -JKQTmathText::MTfracNode::~MTfracNode() { +JKQTMathText::MTfracNode::~MTfracNode() { if (child1!=nullptr) delete child1; if (child2!=nullptr) delete child2; } -QString JKQTmathText::MTfracNode::getTypeName() const +QString JKQTMathText::MTfracNode::getTypeName() const { return "MTfracNode"; } -void JKQTmathText::MTfracNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTfracNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { QFontMetricsF fm(currentEv.getFont(parent), painter.device()); - JKQTmathText::MTenvironment ev1=currentEv; - JKQTmathText::MTenvironment ev2=currentEv; + JKQTMathText::MTenvironment ev1=currentEv; + JKQTMathText::MTenvironment ev2=currentEv; double xh=fm.xHeight(); //tightBoundingRect("x").height(); double sp=xh; @@ -815,12 +815,12 @@ void JKQTmathText::MTfracNode::getSizeInternal(QPainter& painter, JKQTmathText:: } } -double JKQTmathText::MTfracNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTfracNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); QFont f=currentEv.getFont(parent); QFontMetricsF fm(f, painter.device()); - JKQTmathText::MTenvironment ev1=currentEv; - JKQTmathText::MTenvironment ev2=currentEv; + JKQTMathText::MTenvironment ev1=currentEv; + JKQTMathText::MTenvironment ev2=currentEv; double xh=parent->getTBR(f, "x", painter.device()).height(); //fm.xHeight(); @@ -904,7 +904,7 @@ double JKQTmathText::MTfracNode::draw(QPainter& painter, double x, double y, JKQ } -bool JKQTmathText::MTfracNode::toHtml(QString &/*html*/, JKQTmathText::MTenvironment /*currentEv*/, JKQTmathText::MTenvironment /*defaultEv*/) { +bool JKQTMathText::MTfracNode::toHtml(QString &/*html*/, JKQTMathText::MTenvironment /*currentEv*/, JKQTMathText::MTenvironment /*defaultEv*/) { bool ok=false; @@ -912,7 +912,7 @@ bool JKQTmathText::MTfracNode::toHtml(QString &/*html*/, JKQTmathText::MTenviron return ok; } -void JKQTmathText::MTfracNode::set_drawBoxes(bool draw) +void JKQTMathText::MTfracNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child1->set_drawBoxes(draw); @@ -928,8 +928,8 @@ void JKQTmathText::MTfracNode::set_drawBoxes(bool draw) -JKQTmathText::MTmatrixNode::MTmatrixNode(JKQTmathText* parent, QVector > children): - JKQTmathText::MTnode(parent) +JKQTMathText::MTmatrixNode::MTmatrixNode(JKQTMathText* parent, QVector > children): + JKQTMathText::MTnode(parent) { this->lines=children.size(); this->columns=0; @@ -939,7 +939,7 @@ JKQTmathText::MTmatrixNode::MTmatrixNode(JKQTmathText* parent, QVectorchildren=children; } -JKQTmathText::MTmatrixNode::~MTmatrixNode() { +JKQTMathText::MTmatrixNode::~MTmatrixNode() { for (int i=0; idrawBoxes=draw; for (int i=0; ichild=child; this->decoration=decoration; } -JKQTmathText::MTdecoratedNode::~MTdecoratedNode() { +JKQTMathText::MTdecoratedNode::~MTdecoratedNode() { if (child!=nullptr) delete child; } -void JKQTmathText::MTdecoratedNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTdecoratedNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { QFontMetricsF fm(currentEv.getFont(parent), painter.device()); double wc=fm.boundingRect("A").width(); double dheightfactor=1.0+parent->get_decoration_height_factor()*2.0; @@ -1102,7 +1102,7 @@ void JKQTmathText::MTdecoratedNode::getSizeInternal(QPainter& painter, JKQTmathT width=width+0.3*wc; } -double JKQTmathText::MTdecoratedNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTdecoratedNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); MTenvironment ev=currentEv; double width=0, baselineHeight=0, overallHeight=0, strikeoutPos=0; @@ -1214,23 +1214,23 @@ double JKQTmathText::MTdecoratedNode::draw(QPainter& painter, double x, double y return xnew+0.3*wc; } -bool JKQTmathText::MTdecoratedNode::toHtml(QString &/*html*/, JKQTmathText::MTenvironment /*currentEv*/, JKQTmathText::MTenvironment /*defaultEv*/) { +bool JKQTMathText::MTdecoratedNode::toHtml(QString &/*html*/, JKQTMathText::MTenvironment /*currentEv*/, JKQTMathText::MTenvironment /*defaultEv*/) { //QString f; - //JKQTmathText::MTenvironment ev=currentEv; + //JKQTMathText::MTenvironment ev=currentEv; //bool ok=child->toHtml(html, ev, defaultEv); return false; } -void JKQTmathText::MTdecoratedNode::set_drawBoxes(bool draw) +void JKQTMathText::MTdecoratedNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child->set_drawBoxes(draw); } -QString JKQTmathText::MTdecoratedNode::getTypeName() const +QString JKQTMathText::MTdecoratedNode::getTypeName() const { return "MTdecoratedNode"; } @@ -1240,18 +1240,18 @@ QString JKQTmathText::MTdecoratedNode::getTypeName() const -JKQTmathText::MTsuperscriptNode::MTsuperscriptNode(JKQTmathText* parent, MTnode* child): - JKQTmathText::MTnode(parent) +JKQTMathText::MTsuperscriptNode::MTsuperscriptNode(JKQTMathText* parent, MTnode* child): + JKQTMathText::MTnode(parent) { this->child=child; } -JKQTmathText::MTsuperscriptNode::~MTsuperscriptNode() { +JKQTMathText::MTsuperscriptNode::~MTsuperscriptNode() { if (child!=nullptr) delete child; } -void JKQTmathText::MTsuperscriptNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { - JKQTmathText::MTenvironment ev=currentEv; +void JKQTMathText::MTsuperscriptNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { + JKQTMathText::MTenvironment ev=currentEv; ev.fontSize=ev.fontSize*parent->get_subsuper_size_factor(); QFontMetricsF fm(currentEv.getFont(parent), painter.device()); child->getSize(painter, ev, width, baselineHeight, overallHeight, strikeoutPos); @@ -1261,9 +1261,9 @@ void JKQTmathText::MTsuperscriptNode::getSizeInternal(QPainter& painter, JKQTmat if (currentEv.italic) width=width+double(fm.width(' '))*parent->get_italic_correction_factor(); } -double JKQTmathText::MTsuperscriptNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTsuperscriptNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); - JKQTmathText::MTenvironment ev=currentEv; + JKQTMathText::MTenvironment ev=currentEv; ev.fontSize=ev.fontSize*parent->get_subsuper_size_factor(); double cwidth, cbaselineHeight, coverallheight, cStrikeoutPos; @@ -1279,18 +1279,18 @@ double JKQTmathText::MTsuperscriptNode::draw(QPainter& painter, double x, double return child->draw(painter, xx, y-shift, ev);//+0.5*fm.boundingRect("A").width(); } -bool JKQTmathText::MTsuperscriptNode::isSubOrSuper() +bool JKQTMathText::MTsuperscriptNode::isSubOrSuper() { return true; } -QString JKQTmathText::MTsuperscriptNode::getTypeName() const +QString JKQTMathText::MTsuperscriptNode::getTypeName() const { return "MTsuperscriptNode"; } -bool JKQTmathText::MTsuperscriptNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) +bool JKQTMathText::MTsuperscriptNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { html=html+""; bool ok=child->toHtml(html, currentEv, defaultEv); @@ -1298,7 +1298,7 @@ bool JKQTmathText::MTsuperscriptNode::toHtml(QString &html, JKQTmathText::MTenvi return ok; } -void JKQTmathText::MTsuperscriptNode::set_drawBoxes(bool draw) +void JKQTMathText::MTsuperscriptNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child->set_drawBoxes(draw); @@ -1310,8 +1310,8 @@ void JKQTmathText::MTsuperscriptNode::set_drawBoxes(bool draw) -JKQTmathText::MTbraceNode::MTbraceNode(JKQTmathText* parent, QString openbrace, QString closebrace, MTnode* child, bool showRightBrace): - JKQTmathText::MTnode(parent) +JKQTMathText::MTbraceNode::MTbraceNode(JKQTMathText* parent, QString openbrace, QString closebrace, MTnode* child, bool showRightBrace): + JKQTMathText::MTnode(parent) { this->child=child; this->openbrace=openbrace; @@ -1319,13 +1319,13 @@ JKQTmathText::MTbraceNode::MTbraceNode(JKQTmathText* parent, QString openbrace, this->showRightBrace=showRightBrace; } -JKQTmathText::MTbraceNode::~MTbraceNode() { +JKQTMathText::MTbraceNode::~MTbraceNode() { if (child!=nullptr) delete child; } -void JKQTmathText::MTbraceNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTbraceNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { - JKQTmathText::MTenvironment ev=currentEv; + JKQTMathText::MTenvironment ev=currentEv; child->getSize(painter, currentEv, width, baselineHeight, overallHeight, strikeoutPos); double bracewidth=0, braceheight=0; @@ -1341,10 +1341,10 @@ void JKQTmathText::MTbraceNode::getSizeInternal(QPainter& painter, JKQTmathText: } -double JKQTmathText::MTbraceNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTbraceNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { //std::cout<<"drawing brace-node: '"<get_brace_shrink_factor()-lw; } -bool JKQTmathText::MTbraceNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { +bool JKQTMathText::MTbraceNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { QString ob=openbrace; QString cb=closebrace; if (ob=="<") ob="⟨"; @@ -1533,19 +1533,19 @@ bool JKQTmathText::MTbraceNode::toHtml(QString &html, JKQTmathText::MTenvironmen return ok; } -void JKQTmathText::MTbraceNode::set_drawBoxes(bool draw) +void JKQTMathText::MTbraceNode::set_drawBoxes(bool draw) { this->drawBoxes=draw; child->set_drawBoxes(draw); } -QString JKQTmathText::MTbraceNode::getTypeName() const +QString JKQTMathText::MTbraceNode::getTypeName() const { return QLatin1String("MTbraceNode(")+openbrace+" "+closebrace+")"; } -void JKQTmathText::MTbraceNode::getBraceWidth(QPainter &/*painter*/, JKQTmathText::MTenvironment ev, double /*baselineHeight*/, double overallHeight, double &bracewidth, double &braceheight) +void JKQTMathText::MTbraceNode::getBraceWidth(QPainter &/*painter*/, JKQTMathText::MTenvironment ev, double /*baselineHeight*/, double overallHeight, double &bracewidth, double &braceheight) { /*QFont evf=ev.getFont(parent); if (ev.insideMath) evf.setItalic(false); @@ -1573,8 +1573,8 @@ void JKQTmathText::MTbraceNode::getBraceWidth(QPainter &/*painter*/, JKQTmathTex -JKQTmathText::MTlistNode::MTlistNode(JKQTmathText* parent): - JKQTmathText::MTnode(parent) +JKQTMathText::MTlistNode::MTlistNode(JKQTMathText* parent): + JKQTMathText::MTnode(parent) { nodes.clear(); // these operations cause sub/sup script to be typeset over/under the operator, not right besides! @@ -1585,19 +1585,19 @@ JKQTmathText::MTlistNode::MTlistNode(JKQTmathText* parent): <<"liminf"<<"limsup"<<"lim"<<"max"<<"min"; } -JKQTmathText::MTlistNode::~MTlistNode() { +JKQTMathText::MTlistNode::~MTlistNode() { for (int i=0; idrawBoxes=draw; for (int i=0; iget_fontGreek()); break; @@ -2749,7 +2749,7 @@ QFont JKQTmathText::MTsymbolNode::getFontName(symbolFont f, QFont& fi) { return fr; } -void JKQTmathText::MTsymbolNode::getSizeInternal(QPainter& painter, JKQTmathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { +void JKQTMathText::MTsymbolNode::getSizeInternal(QPainter& painter, JKQTMathText::MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos) { QFont f=currentEv.getFont(parent); f=getFontName(font, f); f.setPointSizeF(f.pointSizeF()*fontFactor); @@ -2801,7 +2801,7 @@ void JKQTmathText::MTsymbolNode::getSizeInternal(QPainter& painter, JKQTmathText } -double JKQTmathText::MTsymbolNode::draw(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv) { +double JKQTMathText::MTsymbolNode::draw(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv) { doDrawBoxes(painter, x, y, currentEv); double width=0; double baselineHeight=0; @@ -2919,10 +2919,10 @@ double JKQTmathText::MTsymbolNode::draw(QPainter& painter, double x, double y, J return x+width; } -bool JKQTmathText::MTsymbolNode::toHtml(QString &html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv) { +bool JKQTMathText::MTsymbolNode::toHtml(QString &html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) { bool ok=true; QString s; - JKQTmathText::MTenvironment ev=currentEv; + JKQTMathText::MTenvironment ev=currentEv; static QMap entitylut; if (entitylut.isEmpty()) { @@ -3134,9 +3134,9 @@ bool JKQTmathText::MTsymbolNode::toHtml(QString &html, JKQTmathText::MTenvironme // -------------------------------------------------------------------------------------------------- -// -- implementation of the JKQTmathText methods +// -- implementation of the JKQTMathText methods // -------------------------------------------------------------------------------------------------- -JKQTmathText::JKQTmathText(QObject* parent): +JKQTMathText::JKQTMathText(QObject* parent): QObject(parent) { Q_INIT_RESOURCE(xits); @@ -3231,16 +3231,16 @@ JKQTmathText::JKQTmathText(QObject* parent): parsingMathEnvironment=false; } -JKQTmathText::~JKQTmathText() { +JKQTMathText::~JKQTMathText() { if (parsedNode!=nullptr) delete parsedNode; parsedNode=nullptr; if (unparsedNode!=nullptr) delete unparsedNode; unparsedNode=nullptr; } -void JKQTmathText::loadSettings(QSettings& settings, QString group){ +void JKQTMathText::loadSettings(QSettings& settings, QString group){ fontSize=settings.value(group+"font_size", fontSize).toDouble(); - fontColor=QColor(settings.value(group+"font_color", JKQTP_QColor2String(fontColor)).toString()); + fontColor=QColor(settings.value(group+"font_color", jkqtp_QColor2String(fontColor)).toString()); fontRoman=settings.value(group+"font_roman", fontRoman).toString(); fontSans=settings.value(group+"font_sans", fontSans).toString(); fontTypewriter=settings.value(group+"font_typewriter", fontTypewriter).toString(); @@ -3281,9 +3281,9 @@ void JKQTmathText::loadSettings(QSettings& settings, QString group){ } -void JKQTmathText::saveSettings(QSettings& settings, QString group){ +void JKQTMathText::saveSettings(QSettings& settings, QString group){ JKQTMTPROPERTYsave(settings, group, fontSize,"font_size"); - if (fontColor!=def_fontColor) settings.setValue(group+"font_color", JKQTP_QColor2String(fontColor)); + if (fontColor!=def_fontColor) settings.setValue(group+"font_color", jkqtp_QColor2String(fontColor)); JKQTMTPROPERTYsave(settings, group, fontRoman, "font_roman"); JKQTMTPROPERTYsave(settings, group, fontSans, "font_sans"); JKQTMTPROPERTYsave(settings, group, fontTypewriter, "font_typewriter"); @@ -3319,7 +3319,7 @@ void JKQTmathText::saveSettings(QSettings& settings, QString group){ } } -void JKQTmathText::useSTIX() { +void JKQTMathText::useSTIX() { useSTIXfonts=true; QString fontname="STIX Two Math Standard"; QString fontnametxt="STIX Two Text"; @@ -3348,24 +3348,24 @@ void JKQTmathText::useSTIX() { brace_shrink_factor=0.6; } -void JKQTmathText::useXITS() +void JKQTMathText::useXITS() { QFontDatabase fdb; #ifdef AUTOLOAD_XITS_FONTS //qDebug()<<"has XITS: "<parseString.size()-1) return currentToken=MTTnone; QChar c=parseString[currentTokenID]; @@ -3598,7 +3598,7 @@ JKQTmathText::tokenType JKQTmathText::getToken() { return currentToken=MTTnone; } -JKQTmathText::MTnode* JKQTmathText::parseLatexString(bool get, QString quitOnClosingBrace, QString quitOnEnvironmentEnd) { +JKQTMathText::MTnode* JKQTMathText::parseLatexString(bool get, QString quitOnClosingBrace, QString quitOnEnvironmentEnd) { //std::cout<<" entering parseLatexString()\n"; MTlistNode* nl=new MTlistNode(this); if (get) getToken(); @@ -3857,7 +3857,7 @@ JKQTmathText::MTnode* JKQTmathText::parseLatexString(bool get, QString quitOnClo nl->addNode(new MTbraceNode(this, "#", "#", parseLatexString(currentTokenName.size()<=0, "#"), showRightBrace)); } else if (currentTokenName[0]=='.') { currentTokenName=currentTokenName.right(currentTokenName.size()-1); - JKQTmathText::MTnode* cn=parseLatexString(currentTokenName.size()<=0, "any"); + JKQTMathText::MTnode* cn=parseLatexString(currentTokenName.size()<=0, "any"); nl->addNode(new MTbraceNode(this, ".", currentTokenName, cn, showRightBrace)); } else { getNew=false; @@ -3995,12 +3995,12 @@ JKQTmathText::MTnode* JKQTmathText::parseLatexString(bool get, QString quitOnClo } -QList JKQTmathText::tbrs=QList(); -QHash JKQTmathText::tbrh=QHash(); +QList JKQTMathText::tbrs=QList(); +QHash JKQTMathText::tbrh=QHash(); -QRectF JKQTmathText::getTBR(const QFont &fm, const QString &text, QPaintDevice *pd) +QRectF JKQTMathText::getTBR(const QFont &fm, const QString &text, QPaintDevice *pd) { - JKQTmathText::tbrDataH dh(fm, text, pd); + JKQTMathText::tbrDataH dh(fm, text, pd); if (pd) { if (tbrh.contains(dh)) return tbrh[dh]; /*for (int i=0; idrawBoxes=draw; } -QString JKQTmathText::MTnode::getTypeName() const +QString JKQTMathText::MTnode::getTypeName() const { return "MTnode"; } -QString JKQTmathText::fracModeToString(JKQTmathText::MTfracMode mode) +QString JKQTMathText::fracModeToString(JKQTMathText::MTfracMode mode) { switch(mode) { case MTFMfrac: @@ -4179,7 +4179,7 @@ QString JKQTmathText::fracModeToString(JKQTmathText::MTfracMode mode) } -QString JKQTmathText::decorationToString(JKQTmathText::MTdecoration mode) +QString JKQTMathText::decorationToString(JKQTMathText::MTdecoration mode) { switch(mode) { case MTDvec: @@ -4208,10 +4208,10 @@ QString JKQTmathText::decorationToString(JKQTmathText::MTdecoration mode) return "unknown"; } -JKQTmathTextLabel::JKQTmathTextLabel(QWidget *parent): +JKQTMathTextLabel::JKQTMathTextLabel(QWidget *parent): QLabel(parent) { - m_mathText=new JKQTmathText(this); + m_mathText=new JKQTMathText(this); m_mathText->useXITS(); m_mathText->set_fontSize(font().pointSizeF()*1.3); lastText=""; @@ -4219,16 +4219,16 @@ JKQTmathTextLabel::JKQTmathTextLabel(QWidget *parent): buffer=QPixmap(); } -JKQTmathTextLabel::~JKQTmathTextLabel() +JKQTMathTextLabel::~JKQTMathTextLabel() { } -JKQTmathText *JKQTmathTextLabel::getMathText() const +JKQTMathText *JKQTMathTextLabel::getMathText() const { return m_mathText; } -void JKQTmathTextLabel::setMath(const QString &text, bool doRepaint) +void JKQTMathTextLabel::setMath(const QString &text, bool doRepaint) { if (text!=lastText || doRepaint){ lastText=text; @@ -4239,7 +4239,7 @@ void JKQTmathTextLabel::setMath(const QString &text, bool doRepaint) } -void JKQTmathTextLabel::internalPaint() +void JKQTMathTextLabel::internalPaint() { //return; //qDebug()<<"internalPaint "<parse(lastText)<<"\n "<get_error_list().join("\n")<<"\n\n"; if (!m_mathText->parse(lastText)) { - qDebug()<<"JKQTmathTextLabel::internalPaint(): parse '"<parse(lastText)<<"\n "<get_error_list().join("\n")<<"\n\n"; + qDebug()<<"JKQTMathTextLabel::internalPaint(): parse '"<parse(lastText)<<"\n "<get_error_list().join("\n")<<"\n\n"; } if (buffer.width()<=0 || buffer.height()<=0) buffer=QPixmap(1000,100); @@ -4283,7 +4283,7 @@ void JKQTmathTextLabel::internalPaint() //qDebug()<<"internalPaint(): DONE"; } -void JKQTmathTextLabel::paintEvent(QPaintEvent *event) +void JKQTMathTextLabel::paintEvent(QPaintEvent *event) { //QLabel::paintEvent(event); //return; @@ -4297,7 +4297,7 @@ void JKQTmathTextLabel::paintEvent(QPaintEvent *event) -JKQTmathText::tbrData::tbrData(const QFont &f, const QString &text, QPaintDevice *pd): +JKQTMathText::tbrData::tbrData(const QFont &f, const QString &text, QPaintDevice *pd): fm(f, pd) { this->text=text; @@ -4317,13 +4317,13 @@ JKQTmathText::tbrData::tbrData(const QFont &f, const QString &text, QPaintDevic } } -bool JKQTmathText::tbrData::operator==(const JKQTmathText::tbrData &other) const +bool JKQTMathText::tbrData::operator==(const JKQTMathText::tbrData &other) const { return ldpiX==other.ldpiX && ldpiY==other.ldpiY && text==other.text && f==other.f; } -JKQTmathText::tbrDataH::tbrDataH(const QFont &f, const QString &text, QPaintDevice *pd) +JKQTMathText::tbrDataH::tbrDataH(const QFont &f, const QString &text, QPaintDevice *pd) { this->text=text; this->f=f; @@ -4340,31 +4340,31 @@ JKQTmathText::tbrDataH::tbrDataH(const QFont &f, const QString &text, QPaintDevi } } -bool JKQTmathText::tbrDataH::operator==(const JKQTmathText::tbrDataH &other) const +bool JKQTMathText::tbrDataH::operator==(const JKQTMathText::tbrDataH &other) const { return ldpiX==other.ldpiX && ldpiY==other.ldpiY && text==other.text && f==other.f; } -JKQTmathText::MTplainTextNode::MTplainTextNode(JKQTmathText *parent, QString text, bool addWhitespace, bool stripInnerWhitepace): - JKQTmathText::MTtextNode(parent, text, addWhitespace, stripInnerWhitepace) +JKQTMathText::MTplainTextNode::MTplainTextNode(JKQTMathText *parent, QString text, bool addWhitespace, bool stripInnerWhitepace): + JKQTMathText::MTtextNode(parent, text, addWhitespace, stripInnerWhitepace) { } -QString JKQTmathText::MTplainTextNode::getTypeName() const +QString JKQTMathText::MTplainTextNode::getTypeName() const {return QLatin1String("MTplainTextNode(")+text+")"; } -QString JKQTmathText::MTplainTextNode::textTransform(const QString &text, JKQTmathText::MTenvironment /*currentEv*/, bool /*forSize*/) +QString JKQTMathText::MTplainTextNode::textTransform(const QString &text, JKQTMathText::MTenvironment /*currentEv*/, bool /*forSize*/) { return text; } -void initJKQTmathTextResources() +void initJKQTMathTextResources() { Q_INIT_RESOURCE(xits); } diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index f27563cc11..ea696151c2 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -50,27 +50,27 @@ -/** \brief initialized Qt-ressources necessary for JKQTmathText +/** \brief initialized Qt-ressources necessary for JKQTMathText * \ingroup jkqtmathtext */ -LIB_EXPORT void initJKQTmathTextResources(); +LIB_EXPORT void initJKQTMathTextResources(); /*! \brief this class parses a LaTeX string and can then draw the contained text/equation onto a QPainter \ingroup jkqtmathtext - JKQTmathText is a self-contained LaTeX-renderer for Qt. It is used to renderer - labels in JKQtPlotter/JKQtBasePlotter, but can be used independently. + JKQTMathText is a self-contained LaTeX-renderer for Qt. It is used to renderer + labels in JKQTPLotter/JKQTBasePlotter, but can be used independently. The class does not depend on any library, except Qt. In particular it actually parses a LaTeX string and draws it in pure C++. It does NOT rely on an installed LaTeX for the rendering! - \section JKQTmathTextUsage Usage - \subsection JKQTmathTextUsageDirect Direct Usage + \section JKQTMathTextUsage Usage + \subsection JKQTMathTextUsageDirect Direct Usage This small piece of C++ code may serve as an example of the usage and capabilities of the class: \code - // create a JKQTmathText object. - JKQTmathText mathText; + // create a JKQTMathText object. + JKQTMathText mathText; // configure its properties to influence the rendering (e.g. fonts to use, font size, ...) mathText.useXITS(); @@ -87,7 +87,7 @@ LIB_EXPORT void initJKQTmathTextResources(); painter.end(); \endcode - \subsection JKQTmathTextSizing Determining the size of an equation + \subsection JKQTMathTextSizing Determining the size of an equation In addition there are also functions that allow to calculate the size of the equation, before drawing it (just like the functions in QFontMetrics and QFontMetricsF): - getSizeDetail() @@ -95,28 +95,28 @@ LIB_EXPORT void initJKQTmathTextResources(); - getAscent(), getDescent() . - \subsection JKQTmathTextErrorHandling Error Handling + \subsection JKQTMathTextErrorHandling Error Handling The class is designed to be as robust as possible and will still return some output, even if the equation contains some errors. Nevertheless, several errors are detected while parsing. You can get a list of error messages using get_error_list() after calling parse(). Also parse() will return \c false if an error occured while parsing. - \subsection JKQTmathTextUsageQLabel Usage within a QLabel class JKQTmathTextLabel + \subsection JKQTMathTextUsageQLabel Usage within a QLabel class JKQTMathTextLabel - Finally, there is also a QLabel-derived class JKQTmathTextLabel which can be used for drawing a LaTeX string onto a Qt form. + Finally, there is also a QLabel-derived class JKQTMathTextLabel which can be used for drawing a LaTeX string onto a Qt form. - \see JKQTmathTextLabel + \see JKQTMathTextLabel - \section JKQTmathTextExamples Examples + \section JKQTMathTextExamples Examples Examples for the usage of this class can be found here: - - \ref JKQTmathTextSimpleExample + - \ref JKQTMathTextSimpleExample . - \section JKQTmathTextSuppoertedLaTeX Supported LaTeX Subset + \section JKQTMathTextSuppoertedLaTeX Supported LaTeX Subset The supported LaTeX subset is listes below. Please note that some commands are used differently than in actual LaTeX. For example \c \\bf is just a renamed form of \c \\textbf and used as \c \\bf{...} and NOT as \c {\\bf...} . @@ -152,7 +152,7 @@ LIB_EXPORT void initJKQTmathTextResources(); - \c \\left~ \c \\right~ : ceil braces |~ ~| . - \section JKQTmathTextSuppoertedFonts Font Handling + \section JKQTMathTextSuppoertedFonts Font Handling Several fonts are defined as properties to the class: - A "roman" font used as the standard font ( set_fontRoman() in math-mode set_fontMathRoman() ) @@ -167,7 +167,7 @@ LIB_EXPORT void initJKQTmathTextResources(); - A "caligraphic" font used to display caligraphic characters ( set_fontCaligraphic() ) . - These fonts are generic font classes, which font is actually used can be configured in JKQTmathText class with the \c set_...() functions mentioned above. You can also use these functions to set the fonts used for math rendering in math-mode: + These fonts are generic font classes, which font is actually used can be configured in JKQTMathText class with the \c set_...() functions mentioned above. You can also use these functions to set the fonts used for math rendering in math-mode: - useSTIX() use the STIX fonts from https://www.stixfonts.org/ in math-mode
\image html jkqtmathparser_stix.png - useXITS() use the XITS fonts from https://github.com/alif-type/xits in math-mode. These are included by default in this library and also activated by default.
\image html jkqtmathparser_xits.png - useASANA() use the ASANA fonts from https://ctan.org/tex-archive/fonts/Asana-Math/ in math-mode
\image html jkqtmathparser_asana.png @@ -184,20 +184,20 @@ LIB_EXPORT void initJKQTmathTextResources(); . - \section JKQTmathTextToHTML Convert to HTML + \section JKQTMathTextToHTML Convert to HTML The method toHtml() may be used to get a HTML representation of the LaTeX string, if possible (only for simple LaTeX equations!). Whether the transformation was possible is returned as a call by value argument! */ -class LIB_EXPORT JKQTmathText : public QObject { +class LIB_EXPORT JKQTMathText : public QObject { Q_OBJECT public: /** \brief class constructor */ - JKQTmathText(QObject * parent = nullptr); + JKQTMathText(QObject * parent = nullptr); /** \brief class destructor */ - ~JKQTmathText(); + ~JKQTMathText(); /** \brief load the object settings from the given QSettings object with the given name prefix */ void loadSettings(QSettings& settings, QString group=QString("mathtext")); /** \brief store the object settings to the given QSettings object with the given name prefix */ @@ -777,7 +777,7 @@ class LIB_EXPORT JKQTmathText : public QObject { bool insideMath; - QFont getFont(JKQTmathText* parent) const; + QFont getFont(JKQTMathText* parent) const; QString toHtmlStart(MTenvironment defaultEv) const; QString toHtmlAfter(MTenvironment defaultEv) const; }; @@ -787,7 +787,7 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing one node in the syntax tree */ class MTnode { public: - MTnode(JKQTmathText* parent); + MTnode(JKQTMathText* parent); virtual ~MTnode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos)=0; void getSize(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); @@ -796,7 +796,7 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief returns true if node is subscript or superscript node */ virtual bool isSubOrSuper() { return false; } /** \brief convert node to HTML and returns \c true on success */ - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); /*! \brief returns the property drawBoxes. \details Description of the parameter drawBoxes is:
\copybrief drawBoxes
. @@ -807,19 +807,19 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const; protected: - JKQTmathText* parent; + JKQTMathText* parent; bool drawBoxes; - void doDrawBoxes(QPainter& painter, double x, double y, JKQTmathText::MTenvironment currentEv); + void doDrawBoxes(QPainter& painter, double x, double y, JKQTMathText::MTenvironment currentEv); }; /** \brief subclass representing one text node in the syntax tree */ class MTtextNode: public MTnode { public: - MTtextNode(JKQTmathText* parent, QString text, bool addWhitespace, bool stripInnerWhitepace=false); + MTtextNode(JKQTMathText* parent, QString text, bool addWhitespace, bool stripInnerWhitepace=false); virtual ~MTtextNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); /*! \brief returns the property text. \details Description of the parameter text is:
\copybrief text
. \see text for more information */ @@ -829,36 +829,36 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual QString getTypeName() const override ; protected: QString text; - virtual QString textTransform(const QString& text, JKQTmathText::MTenvironment currentEv, bool forSize=false); + virtual QString textTransform(const QString& text, JKQTMathText::MTenvironment currentEv, bool forSize=false); }; /** \brief subclass representing one text node in the syntax tree */ class MTplainTextNode: public MTtextNode { public: - MTplainTextNode(JKQTmathText* parent, QString text, bool addWhitespace, bool stripInnerWhitepace=false); + MTplainTextNode(JKQTMathText* parent, QString text, bool addWhitespace, bool stripInnerWhitepace=false); virtual QString getTypeName() const; protected: - virtual QString textTransform(const QString& text, JKQTmathText::MTenvironment currentEv, bool forSize=false); + virtual QString textTransform(const QString& text, JKQTMathText::MTenvironment currentEv, bool forSize=false); }; /** \brief subclass representing one whitepsace node in the syntax tree */ class MTwhitespaceNode: public MTtextNode { public: - MTwhitespaceNode(JKQTmathText* parent); + MTwhitespaceNode(JKQTMathText* parent); virtual ~MTwhitespaceNode(); virtual QString getTypeName() const; /** \brief convert node to HTML and returns \c true on success */ - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); }; /** \brief subclass representing one symbol (e.g. \c \\alpha , \c \\cdot ...) node in the syntax tree */ class MTsymbolNode: public MTnode { public: - MTsymbolNode(JKQTmathText* parent, QString name, bool addWhitespace); + MTsymbolNode(JKQTMathText* parent, QString name, bool addWhitespace); virtual ~MTsymbolNode(); virtual QString getTypeName() const; virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); /*! \brief returns the property symbolName. \details Description of the parameter symbolName is:
\copybrief symbolName
. \see symbolName for more information */ @@ -894,13 +894,13 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a list of nodes in the syntax tree */ class MTlistNode: public MTnode { public: - MTlistNode(JKQTmathText* parent); + MTlistNode(JKQTMathText* parent); virtual ~MTlistNode(); virtual QString getTypeName() const; virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); void addNode(MTnode* n) { nodes.append(n); } - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); /*! \brief returns the property nodes. \details Description of the parameter nodes is:
\copybrief nodes
. @@ -916,13 +916,13 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing an instruction node with exactly one argument in the syntax tree */ class MTinstruction1Node: public MTnode { public: - MTinstruction1Node(JKQTmathText* parent, QString name, MTnode* child, const QStringList& parameters=QStringList()); + MTinstruction1Node(JKQTMathText* parent, QString name, MTnode* child, const QStringList& parameters=QStringList()); virtual ~MTinstruction1Node(); virtual QString getTypeName() const; virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); /** \brief convert node to HTML and returns \c true on success */ - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); /*! \brief returns the property child. \details Description of the parameter child is:
\copybrief child
. @@ -943,7 +943,7 @@ class LIB_EXPORT JKQTmathText : public QObject { return this->parameters; } protected: - bool setupMTenvironment(JKQTmathText::MTenvironment &ev); + bool setupMTenvironment(JKQTMathText::MTenvironment &ev); MTnode* child; QString name; @@ -955,7 +955,7 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing an subscript node with exactly one argument in the syntax tree */ class MTsubscriptNode: public MTnode { public: - MTsubscriptNode(JKQTmathText* parent, MTnode* child); + MTsubscriptNode(JKQTMathText* parent, MTnode* child); virtual ~MTsubscriptNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); @@ -968,7 +968,7 @@ class LIB_EXPORT JKQTmathText : public QObject { inline MTnode* get_child() const { return this->child; } - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); protected: MTnode* child; @@ -977,7 +977,7 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing an superscript node with exactly one argument in the syntax tree */ class MTsuperscriptNode: public MTnode { public: - MTsuperscriptNode(JKQTmathText* parent, MTnode* child); + MTsuperscriptNode(JKQTMathText* parent, MTnode* child); virtual ~MTsuperscriptNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); @@ -990,7 +990,7 @@ class LIB_EXPORT JKQTmathText : public QObject { return this->child; } virtual QString getTypeName() const; - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); protected: MTnode* child; @@ -999,11 +999,11 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a brace node */ class MTbraceNode: public MTnode { public: - MTbraceNode(JKQTmathText* parent, QString openbrace, QString closebrace, MTnode* child, bool showRightBrace=true); + MTbraceNode(JKQTMathText* parent, QString openbrace, QString closebrace, MTnode* child, bool showRightBrace=true); virtual ~MTbraceNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const; /*! \brief returns the property child. @@ -1043,11 +1043,11 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a sqrt node */ class MTsqrtNode: public MTnode { public: - MTsqrtNode(JKQTmathText* parent, MTnode* child, int degree=2); + MTsqrtNode(JKQTMathText* parent, MTnode* child, int degree=2); virtual ~MTsqrtNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const ; /*! \brief returns the property child. @@ -1083,12 +1083,12 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a \\frac node */ class MTfracNode: public MTnode { public: - MTfracNode(JKQTmathText* parent, MTnode* child_top, MTnode* child_bottom, MTfracMode mode); + MTfracNode(JKQTMathText* parent, MTnode* child_top, MTnode* child_bottom, MTfracMode mode); virtual ~MTfracNode(); virtual QString getTypeName() const ; virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); /*! \brief returns the property child1. \details Description of the parameter child1 is:
\copybrief child1
. @@ -1117,12 +1117,12 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a \\begin{matrix} node */ class MTmatrixNode: public MTnode { public: - MTmatrixNode(JKQTmathText* parent, QVector > children); + MTmatrixNode(JKQTMathText* parent, QVector > children); virtual ~MTmatrixNode(); virtual QString getTypeName() const; virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); /*! \brief returns the property children. \details Description of the parameter children is:
\copybrief children
. \see children for more information */ @@ -1167,11 +1167,11 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief subclass representing a decorated text m (e.g. \c \\vec \c \\hat ...) node */ class MTdecoratedNode: public MTnode { public: - MTdecoratedNode(JKQTmathText* parent, MTdecoration decoration, MTnode* child); + MTdecoratedNode(JKQTMathText* parent, MTdecoration decoration, MTnode* child); virtual ~MTdecoratedNode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); - virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); + virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const ; /*! \brief returns the property child. @@ -1448,40 +1448,40 @@ class LIB_EXPORT JKQTmathText : public QObject { bool operator==(const tbrDataH& other) const; }; - static QList tbrs; - static QHash tbrh; + static QList tbrs; + static QHash tbrh; static QRectF getTBR(const QFont &fm, const QString& text, QPaintDevice *pd); }; -inline uint qHash(const JKQTmathText::tbrDataH& data) { +inline uint qHash(const JKQTMathText::tbrDataH& data) { return qHash(data.f.family())+qHash(data.text); } -/*! \brief A QLabel-derived class that draws an equation with LaTeX markup using JKQTmathText +/*! \brief A QLabel-derived class that draws an equation with LaTeX markup using JKQTMathText \ingroup jkqtmathtext - \see JKQTmathText + \see JKQTMathText */ -class LIB_EXPORT JKQTmathTextLabel: public QLabel { +class LIB_EXPORT JKQTMathTextLabel: public QLabel { Q_OBJECT public: - explicit JKQTmathTextLabel(QWidget* parent=nullptr); - virtual ~JKQTmathTextLabel(); + explicit JKQTMathTextLabel(QWidget* parent=nullptr); + virtual ~JKQTMathTextLabel(); - /** \brief returns the internal JKQTmathText instance used for drawing + /** \brief returns the internal JKQTMathText instance used for drawing * * Use this function to set the font, font size and other properties of the used renderer. */ - JKQTmathText* getMathText() const; + JKQTMathText* getMathText() const; /** \brief set the equation to draw */ void setMath(const QString& text, bool doRepaint=true); protected: - JKQTmathText* m_mathText; + JKQTMathText* m_mathText; QString lastText; QPixmap buffer; bool repaintDo; diff --git a/lib/jkqtplotter/jkqtpbaseelements.cpp b/lib/jkqtplotter/jkqtpbaseelements.cpp index 57e908d629..11c7a2a32f 100644 --- a/lib/jkqtplotter/jkqtpbaseelements.cpp +++ b/lib/jkqtplotter/jkqtpbaseelements.cpp @@ -30,7 +30,7 @@ //#undef SHOW_JKQTPLOTTER_DEBUG //#define SHOW_JKQTPLOTTER_DEBUG -JKQTPcoordinateAxis::JKQTPcoordinateAxis(JKQtBasePlotter* parent): QObject(parent) { +JKQTPCoordinateAxis::JKQTPCoordinateAxis(JKQTBasePlotter* parent): QObject(parent) { this->parent=parent; autoLabelDigits=true; @@ -73,7 +73,7 @@ JKQTPcoordinateAxis::JKQTPcoordinateAxis(JKQtBasePlotter* parent): QObject(paren QFont f=QApplication::font(); - labelPosition=def_labelPosition=JKQTPlabelCenter; + labelPosition=def_labelPosition=JKQTPLabelCenter; labelFont=def_labelFont=f.family(); //"Arial"; labelFontSize=def_labelFontSize=f.pointSizeF()+1; //12; tickLabelFont=def_tickLabelFont=f.family(); //"Arial"; @@ -113,22 +113,22 @@ JKQTPcoordinateAxis::JKQTPcoordinateAxis(JKQtBasePlotter* parent): QObject(paren paramsChanged=true; } -JKQTPcoordinateAxis::~JKQTPcoordinateAxis() { +JKQTPCoordinateAxis::~JKQTPCoordinateAxis() { } -void JKQTPcoordinateAxis::set_parent(JKQtBasePlotter* parent) { +void JKQTPCoordinateAxis::set_parent(JKQTBasePlotter* parent) { this->parent=parent; QObject::setParent(parent); } -void JKQTPcoordinateAxis::update_plot() { +void JKQTPCoordinateAxis::update_plot() { //if (paramsChanged) { calcPlotScaling(); parent->update_plot(); //} } -JKQTmathText* JKQTPcoordinateAxis::get_parent_mathText() { +JKQTMathText* JKQTPCoordinateAxis::get_parent_mathText() { return parent->get_mathText(); } @@ -137,7 +137,7 @@ JKQTmathText* JKQTPcoordinateAxis::get_parent_mathText() { #define JKQTPPROPERTYloadFromAxis(settings, param) this->param=settings->param -void JKQTPcoordinateAxis::loadSettings(JKQTPcoordinateAxis* settings) { +void JKQTPCoordinateAxis::loadSettings(JKQTPCoordinateAxis* settings) { JKQTPPROPERTYloadFromAxis(settings, showZeroAxis); JKQTPPROPERTYloadFromAxis(settings, autoAxisSpacing); JKQTPPROPERTYloadFromAxis(settings, minorTickLabelsEnabled); @@ -194,45 +194,45 @@ void JKQTPcoordinateAxis::loadSettings(JKQTPcoordinateAxis* settings) { calcPlotScaling(); } -void JKQTPcoordinateAxis::clearAxisTickLabels() { +void JKQTPCoordinateAxis::clearAxisTickLabels() { tickLabels.clear(); update_plot(); } -void JKQTPcoordinateAxis::addAxisTickLabel(double x, QString label) { +void JKQTPCoordinateAxis::addAxisTickLabel(double x, QString label) { tickLabels.append(qMakePair(x, label)); update_plot(); } -void JKQTPcoordinateAxis::addAxisTickLabels(const QVector &x, const QStringList &label) { +void JKQTPCoordinateAxis::addAxisTickLabels(const QVector &x, const QStringList &label) { for (int i=0; i &x, const QString *label) { +void JKQTPCoordinateAxis::addAxisTickLabels(const QVector &x, const QString *label) { for (int i=0; i2*minTicks) { double power=1; @@ -552,7 +552,7 @@ double JKQTPcoordinateAxis::calcLogTickSpacing() { } -QString JKQTPcoordinateAxis::floattolabel(double data) { +QString JKQTPCoordinateAxis::floattolabel(double data) { int past_comma=labelDigits; bool remove_trail0=true; QLocale loc=QLocale::system(); @@ -604,7 +604,7 @@ QString JKQTPcoordinateAxis::floattolabel(double data) { return QString(); } -QString JKQTPcoordinateAxis::floattolabel(double data, int past_comma) { +QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) { bool remove_trail0=true; QLocale loc=QLocale::system(); loc.setNumberOptions(QLocale::OmitGroupSeparator); @@ -622,7 +622,7 @@ QString JKQTPcoordinateAxis::floattolabel(double data, int past_comma) { return ""; } -int JKQTPcoordinateAxis::calcLinearUnitDigits() { +int JKQTPCoordinateAxis::calcLinearUnitDigits() { if (!autoLabelDigits) return labelDigits; int unitdigits=-1; double minval=tickStart; @@ -644,9 +644,9 @@ int JKQTPcoordinateAxis::calcLinearUnitDigits() { } -void JKQTPcoordinateAxis::calcPlotScaling(bool force) { +void JKQTPCoordinateAxis::calcPlotScaling(bool force) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaat(QString("JKQtBasePlotter[%1]::calcPlotScaling()").arg(objectName())); + JKQTPAutoOutputTimer jkaat(QString("JKQTBasePlotter[%1]::calcPlotScaling()").arg(objectName())); #endif if (!doUpdateScaling) return; if (!force && !paramsChanged) return; @@ -763,11 +763,11 @@ void JKQTPcoordinateAxis::calcPlotScaling(bool force) { } -bool JKQTPcoordinateAxis::isLogAxis() const { +bool JKQTPCoordinateAxis::isLogAxis() const { return logAxis || (tickMode==JKQTPLTMPower); } -void JKQTPcoordinateAxis::setRange(double aamin, double aamax) { +void JKQTPCoordinateAxis::setRange(double aamin, double aamax) { double oldamin=axismin; double oldamax=axismax; double amin=aamin; @@ -808,37 +808,37 @@ void JKQTPcoordinateAxis::setRange(double aamin, double aamax) { } } -void JKQTPcoordinateAxis::setNoAbsoluteRange() { +void JKQTPCoordinateAxis::setNoAbsoluteRange() { axisabsoultemin=-DBL_MAX; axisabsoultemax=DBL_MAX; setRange(axismin, axismax); } -void JKQTPcoordinateAxis::set_tickSpacing(double __value) { +void JKQTPCoordinateAxis::set_tickSpacing(double __value) { this->tickSpacing = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_axisMinWidth(double __value) { +void JKQTPCoordinateAxis::set_axisMinWidth(double __value) { this->axisMinWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_autoAxisSpacing(bool __value) { +void JKQTPCoordinateAxis::set_autoAxisSpacing(bool __value) { this->autoAxisSpacing = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickLabelsEnabled(bool __value) { +void JKQTPCoordinateAxis::set_minorTickLabelsEnabled(bool __value) { this->minorTickLabelsEnabled = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_logAxis(bool __value) +void JKQTPCoordinateAxis::set_logAxis(bool __value) { this->logAxis = __value; this->paramsChanged=true; @@ -852,278 +852,278 @@ void JKQTPcoordinateAxis::set_logAxis(bool __value) update_plot(); } -void JKQTPcoordinateAxis::set_logAxisBase(double __value) { +void JKQTPCoordinateAxis::set_logAxisBase(double __value) { this->logAxisBase = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_userTickSpacing(double __value) { +void JKQTPCoordinateAxis::set_userTickSpacing(double __value) { this->userTickSpacing = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_userLogTickSpacing(double __value) { +void JKQTPCoordinateAxis::set_userLogTickSpacing(double __value) { this->userLogTickSpacing = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelType(JKQTPCAlabelType __value) { +void JKQTPCoordinateAxis::set_labelType(JKQTPCALabelType __value) { this->labelType = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickMode(JKQTPLabelTickMode __value) +void JKQTPCoordinateAxis::set_tickMode(JKQTPLabelTickMode __value) { this->tickMode = __value; this->paramsChanged=true; set_logAxis(this->logAxis); } -void JKQTPcoordinateAxis::set_tickMode(int __value) { +void JKQTPCoordinateAxis::set_tickMode(int __value) { set_tickMode(JKQTPLabelTickMode(__value)); } -void JKQTPcoordinateAxis::set_axisLabel(QString __value) { +void JKQTPCoordinateAxis::set_axisLabel(QString __value) { this->axisLabel = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelPosition(JKQTPlabelPosition __value) { +void JKQTPCoordinateAxis::set_labelPosition(JKQTPLabelPosition __value) { this->labelPosition = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelFont(QString __value) { +void JKQTPCoordinateAxis::set_labelFont(QString __value) { this->labelFont = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelFontSize(double __value) { +void JKQTPCoordinateAxis::set_labelFontSize(double __value) { this->labelFontSize = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickLabelFont(QString __value) { +void JKQTPCoordinateAxis::set_tickLabelFont(QString __value) { this->tickLabelFont = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickTimeFormat(QString __value) { +void JKQTPCoordinateAxis::set_tickTimeFormat(QString __value) { this->tickTimeFormat = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickDateFormat(QString __value) { +void JKQTPCoordinateAxis::set_tickDateFormat(QString __value) { this->tickDateFormat = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickDateTimeFormat(QString __value) { +void JKQTPCoordinateAxis::set_tickDateTimeFormat(QString __value) { this->tickDateTimeFormat = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickLabelFontSize(double __value) { +void JKQTPCoordinateAxis::set_tickLabelFontSize(double __value) { this->tickLabelFontSize = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickLabelFontSize(double __value) { +void JKQTPCoordinateAxis::set_minorTickLabelFontSize(double __value) { this->minorTickLabelFontSize = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickLabelFullNumber(bool __value) { +void JKQTPCoordinateAxis::set_minorTickLabelFullNumber(bool __value) { this->minorTickLabelFullNumber = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minTicks(unsigned int __value) { +void JKQTPCoordinateAxis::set_minTicks(unsigned int __value) { this->minTicks = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTicks(unsigned int __value) { +void JKQTPCoordinateAxis::set_minorTicks(unsigned int __value) { this->minorTicks = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTicks(int __value) { +void JKQTPCoordinateAxis::set_minorTicks(int __value) { this->minorTicks = qMax(int(0), __value); this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickOutsideLength(double __value) { +void JKQTPCoordinateAxis::set_tickOutsideLength(double __value) { this->tickOutsideLength = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickOutsideLength(double __value) { +void JKQTPCoordinateAxis::set_minorTickOutsideLength(double __value) { this->minorTickOutsideLength = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickInsideLength(double __value) { +void JKQTPCoordinateAxis::set_tickInsideLength(double __value) { this->tickInsideLength = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickInsideLength(double __value) { +void JKQTPCoordinateAxis::set_minorTickInsideLength(double __value) { this->minorTickInsideLength = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_axisColor(QColor __value) { +void JKQTPCoordinateAxis::set_axisColor(QColor __value) { this->axisColor = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_showZeroAxis(bool __value) { +void JKQTPCoordinateAxis::set_showZeroAxis(bool __value) { this->showZeroAxis = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_inverted(bool __value) { +void JKQTPCoordinateAxis::set_inverted(bool __value) { this->inverted = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_gridColor(QColor __value) { +void JKQTPCoordinateAxis::set_gridColor(QColor __value) { this->gridColor = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorGridColor(QColor __value) { +void JKQTPCoordinateAxis::set_minorGridColor(QColor __value) { this->minorGridColor = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_gridWidth(double __value) { +void JKQTPCoordinateAxis::set_gridWidth(double __value) { this->gridWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_gridStyle(Qt::PenStyle __value) { +void JKQTPCoordinateAxis::set_gridStyle(Qt::PenStyle __value) { this->gridStyle = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorGridWidth(double __value) { +void JKQTPCoordinateAxis::set_minorGridWidth(double __value) { this->minorGridWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorGridStyle(Qt::PenStyle __value) { +void JKQTPCoordinateAxis::set_minorGridStyle(Qt::PenStyle __value) { this->minorGridStyle = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_drawMode1(JKQTPCAdrawMode __value) { +void JKQTPCoordinateAxis::set_drawMode1(JKQTPCADrawMode __value) { this->drawMode1 = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_drawMode2(JKQTPCAdrawMode __value) { +void JKQTPCoordinateAxis::set_drawMode2(JKQTPCADrawMode __value) { this->drawMode2 = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_minorTickWidth(double __value) { +void JKQTPCoordinateAxis::set_minorTickWidth(double __value) { this->minorTickWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickWidth(double __value) { +void JKQTPCoordinateAxis::set_tickWidth(double __value) { this->tickWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_lineWidth(double __value) { +void JKQTPCoordinateAxis::set_lineWidth(double __value) { this->lineWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_lineWidthZeroAxis(double __value) { +void JKQTPCoordinateAxis::set_lineWidthZeroAxis(double __value) { this->lineWidthZeroAxis = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickLabelDistance(double __value) { +void JKQTPCoordinateAxis::set_tickLabelDistance(double __value) { this->tickLabelDistance = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelDistance(double __value) { +void JKQTPCoordinateAxis::set_labelDistance(double __value) { this->labelDistance = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_labelDigits(int __value) { +void JKQTPCoordinateAxis::set_labelDigits(int __value) { this->labelDigits = __value; this->paramsChanged=true; this->autoLabelDigits=false; update_plot(); } -void JKQTPcoordinateAxis::set_drawGrid(bool __value) { +void JKQTPCoordinateAxis::set_drawGrid(bool __value) { this->drawGrid = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_drawMinorGrid(bool __value) { +void JKQTPCoordinateAxis::set_drawMinorGrid(bool __value) { this->drawMinorGrid = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::set_tickLabelAngle(double __value) { +void JKQTPCoordinateAxis::set_tickLabelAngle(double __value) { this->tickLabelAngle = __value; this->paramsChanged=true; update_plot(); } -void JKQTPcoordinateAxis::setAbsoluteRange(double amin, double amax) { +void JKQTPCoordinateAxis::setAbsoluteRange(double amin, double amax) { axisabsoultemin=amin; axisabsoultemax=amax; @@ -1141,7 +1141,7 @@ void JKQTPcoordinateAxis::setAbsoluteRange(double amin, double amax) { update_plot();*/ } -double JKQTPcoordinateAxis::getNextLabelDistance(double x) { +double JKQTPCoordinateAxis::getNextLabelDistance(double x) { if (tickMode==JKQTPLTMLinOrPower) { if (logAxis) { return x*tickSpacingLog; @@ -1156,8 +1156,8 @@ double JKQTPcoordinateAxis::getNextLabelDistance(double x) { return 0; } -bool JKQTPcoordinateAxis::getNextLabel(double& x, QString& label, bool init) { - //qDebug()<<"start JKQTPcoordinateAxis::getNextLabel("<get_plotHeight(); } -double JKQTPverticalAxis::get_parent_plotoffset() const { +double JKQTPVerticalAxis::get_parent_plotoffset() const { return parent->get_iplotBorderTop(); } -QSize JKQTPverticalAxis::getSize1(JKQTPEnhancedPainter& painter) { +QSize JKQTPVerticalAxis::getSize1(JKQTPEnhancedPainter& painter) { if (drawMode1==JKQTPCADMnone || drawMode1==JKQTPCADMline) return QSize(0, get_parent_plotwidth()); if (drawMode1==JKQTPCADMticks) return QSize(parent->pt2px(painter, tickOutsideLength), get_parent_plotwidth()); // find out the maximum width over all visible plot labels @@ -1290,7 +1290,7 @@ QSize JKQTPverticalAxis::getSize1(JKQTPEnhancedPainter& painter) { return QSize(0,0); } -QSize JKQTPverticalAxis::getSize2(JKQTPEnhancedPainter& painter) { +QSize JKQTPVerticalAxis::getSize2(JKQTPEnhancedPainter& painter) { if (drawMode2==JKQTPCADMnone || drawMode2==JKQTPCADMline) return QSize(0, get_parent_plotwidth()); if (drawMode2==JKQTPCADMticks) return QSize(parent->pt2px(painter, tickOutsideLength),get_parent_plotwidth()); // find out the maximum width over all visible plot labels @@ -1309,22 +1309,22 @@ QSize JKQTPverticalAxis::getSize2(JKQTPEnhancedPainter& painter) { } -double JKQTPverticalAxis::get_parent_otheraxis_offset() const { +double JKQTPVerticalAxis::get_parent_otheraxis_offset() const { return parent->x2p(parent->getXMin()); } -double JKQTPverticalAxis::get_parent_otheraxis_width() const { +double JKQTPVerticalAxis::get_parent_otheraxis_width() const { return fabs(parent->x2p(parent->getXMax())-parent->x2p(parent->getXMin())); } -bool JKQTPverticalAxis::get_parent_otheraxis_inverted() const +bool JKQTPVerticalAxis::get_parent_otheraxis_inverted() const { return parent->get_xAxis()->get_inverted(); } -void JKQTPverticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { - //qDebug()<<" start JKQTPverticalAxis::drawGrids("; +void JKQTPVerticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { + //qDebug()<<" start JKQTPVerticalAxis::drawGrids("; painter.save(); QPen pg=painter.pen(); pg.setColor(gridColor); @@ -1394,10 +1394,10 @@ void JKQTPverticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { painter.setPen(pmg); painter.drawLines(lines_pmg); painter.restore(); - //qDebug()<<" end JKQTPverticalAxis::drawGrids("; + //qDebug()<<" end JKQTPVerticalAxis::drawGrids("; } -void JKQTPverticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString& label, double fontSize) +void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString& label, double fontSize) { get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); get_parent_mathText()->set_fontRoman(tickLabelFont); @@ -1437,7 +1437,7 @@ void JKQTPverticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, } } -void JKQTPverticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize) +void JKQTPVerticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize) { get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); get_parent_mathText()->set_fontRoman(tickLabelFont); @@ -1479,7 +1479,7 @@ void JKQTPverticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, } } -void JKQTPverticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { +void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { // make shure all parameters are calculated correctly calcPlotScaling(); @@ -1499,7 +1499,7 @@ void JKQTPverticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { left=get_parent_otheraxis_offset();//; right=get_parent_otheraxis_offset()+get_parent_otheraxis_width();//; } - //qDebug()<<"JKQTPverticalAxis:"; + //qDebug()<<"JKQTPVerticalAxis:"; //qDebug()<<" left="<draw(painter, Qt::AlignBottom|Qt::AlignRight, rect); break; - case JKQTPlabelMin: + case JKQTPLabelMin: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect); break; - case JKQTPlabelCenter: + case JKQTPLabelCenter: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect); break; } @@ -1710,13 +1710,13 @@ void JKQTPverticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { //painter.drawRect(rect); //painter.drawEllipse(-4, -4, 8, 8); switch(labelPosition) { - case JKQTPlabelMax: + case JKQTPLabelMax: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect); break; - case JKQTPlabelMin: + case JKQTPLabelMin: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect); break; - case JKQTPlabelCenter: + case JKQTPLabelCenter: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect); break; } @@ -1724,7 +1724,7 @@ void JKQTPverticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.restore(); } painter.restore(); - //qDebug()<<" end JKQTPverticalAxis::drawAxes("; + //qDebug()<<" end JKQTPVerticalAxis::drawAxes("; } @@ -1735,8 +1735,8 @@ void JKQTPverticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { -JKQTPverticalIndependentAxis::JKQTPverticalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQtBasePlotter* parent): - JKQTPverticalAxis(parent) +JKQTPVerticalIndependentAxis::JKQTPVerticalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent): + JKQTPVerticalAxis(parent) { this->axisOffset=axisOffset; this->axisWidth=axisWidth; @@ -1745,45 +1745,45 @@ JKQTPverticalIndependentAxis::JKQTPverticalIndependentAxis(double axisOffset, do this->otherAxisInverted=false; } -void JKQTPverticalIndependentAxis::set_axisOffset(double __value) { +void JKQTPVerticalIndependentAxis::set_axisOffset(double __value) { this->axisOffset = __value; this->paramsChanged=true; update_plot(); } -void JKQTPverticalIndependentAxis::set_axisWidth(double __value) { +void JKQTPVerticalIndependentAxis::set_axisWidth(double __value) { this->axisWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPverticalIndependentAxis::set_otherAxisOffset(double __value) { +void JKQTPVerticalIndependentAxis::set_otherAxisOffset(double __value) { this->otherAxisOffset = __value; this->paramsChanged=true; update_plot(); } -void JKQTPverticalIndependentAxis::set_otherAxisWidth(double __value) { +void JKQTPVerticalIndependentAxis::set_otherAxisWidth(double __value) { this->otherAxisWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPverticalIndependentAxis::set_otherAxisInverted(bool __value) { +void JKQTPVerticalIndependentAxis::set_otherAxisInverted(bool __value) { this->otherAxisInverted = __value; this->paramsChanged=true; update_plot(); } -double JKQTPverticalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } +double JKQTPVerticalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } -double JKQTPverticalIndependentAxis::get_parent_plotoffset() const { return axisOffset; } +double JKQTPVerticalIndependentAxis::get_parent_plotoffset() const { return axisOffset; } -double JKQTPverticalIndependentAxis::get_parent_otheraxis_width() const { return otherAxisWidth; } +double JKQTPVerticalIndependentAxis::get_parent_otheraxis_width() const { return otherAxisWidth; } -bool JKQTPverticalIndependentAxis::get_parent_otheraxis_inverted() const { return otherAxisInverted; } +bool JKQTPVerticalIndependentAxis::get_parent_otheraxis_inverted() const { return otherAxisInverted; } -double JKQTPverticalIndependentAxis::get_parent_otheraxis_offset() const { return otherAxisOffset; } +double JKQTPVerticalIndependentAxis::get_parent_otheraxis_offset() const { return otherAxisOffset; } @@ -1794,22 +1794,22 @@ double JKQTPverticalIndependentAxis::get_parent_otheraxis_offset() const { retur -JKQTPhorizontalAxis::JKQTPhorizontalAxis(JKQtBasePlotter* parent): - JKQTPcoordinateAxis(parent) +JKQTPHorizontalAxis::JKQTPHorizontalAxis(JKQTBasePlotter* parent): + JKQTPCoordinateAxis(parent) { //axisPrefix="xaxis_"; scaleSign=1; } -double JKQTPhorizontalAxis::get_parent_plotwidth() const { +double JKQTPHorizontalAxis::get_parent_plotwidth() const { return parent->get_plotWidth(); } -double JKQTPhorizontalAxis::get_parent_plotoffset() const { +double JKQTPHorizontalAxis::get_parent_plotoffset() const { return parent->get_iplotBorderLeft(); } -QSize JKQTPhorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) { +QSize JKQTPHorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) { if (drawMode1==JKQTPCADMnone || drawMode1==JKQTPCADMline) return QSize(get_parent_plotwidth(), 0); if (drawMode1==JKQTPCADMticks) return QSize(get_parent_plotwidth(), parent->pt2px(painter, tickOutsideLength)); // find out the maximum width over all visible plot labels @@ -1828,7 +1828,7 @@ QSize JKQTPhorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) { return QSize(0,0); } -QSize JKQTPhorizontalAxis::getSize2(JKQTPEnhancedPainter& painter) { +QSize JKQTPHorizontalAxis::getSize2(JKQTPEnhancedPainter& painter) { if (drawMode2==JKQTPCADMnone || drawMode2==JKQTPCADMline) return QSize(get_parent_plotwidth(), 0); if (drawMode2==JKQTPCADMticks) return QSize(get_parent_plotwidth(), parent->pt2px(painter, tickOutsideLength)); // find out the maximum width over all visible plot labels @@ -1847,21 +1847,21 @@ QSize JKQTPhorizontalAxis::getSize2(JKQTPEnhancedPainter& painter) { } -double JKQTPhorizontalAxis::get_parent_otheraxis_offset() const { +double JKQTPHorizontalAxis::get_parent_otheraxis_offset() const { return parent->y2p(parent->getYMax()); } -double JKQTPhorizontalAxis::get_parent_otheraxis_width() const { +double JKQTPHorizontalAxis::get_parent_otheraxis_width() const { return fabs(parent->y2p(parent->getYMax())-parent->y2p(parent->getYMin())); } -bool JKQTPhorizontalAxis::get_parent_otheraxis_inverted() const +bool JKQTPHorizontalAxis::get_parent_otheraxis_inverted() const { return parent->get_yAxis()->get_inverted(); } -void JKQTPhorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { +void JKQTPHorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { painter.save(); //double right=x2p(axismax); //double left=x2p(axismin); @@ -1925,7 +1925,7 @@ void JKQTPhorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { } -void JKQTPhorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double /*descentMax*/) +void JKQTPHorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double /*descentMax*/) { get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); get_parent_mathText()->set_fontRoman(tickLabelFont); @@ -1955,7 +1955,7 @@ void JKQTPhorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double x } } -void JKQTPhorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double /*ascentMax*/, double descentMax) +void JKQTPHorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double /*ascentMax*/, double descentMax) { get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); get_parent_mathText()->set_fontRoman(tickLabelFont); @@ -1987,7 +1987,7 @@ void JKQTPhorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double x } } -void JKQTPhorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { +void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { // make shure all parameters are calculated correctly calcPlotScaling(); @@ -2261,13 +2261,13 @@ void JKQTPhorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { //painter.drawRect(rect); //painter.drawEllipse(-4, -4, 8, 8); switch(labelPosition) { - case JKQTPlabelMax: + case JKQTPLabelMax: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect); break; - case JKQTPlabelMin: + case JKQTPLabelMin: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect); break; - case JKQTPlabelCenter: + case JKQTPLabelCenter: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect); break; } @@ -2287,13 +2287,13 @@ void JKQTPhorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { //painter.drawRect(rect); //painter.drawEllipse(-4, -4, 8, 8); switch(labelPosition) { - case JKQTPlabelMax: + case JKQTPLabelMax: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignRight, rect); break; - case JKQTPlabelMin: + case JKQTPLabelMin: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignLeft, rect); break; - case JKQTPlabelCenter: + case JKQTPLabelCenter: get_parent_mathText()->draw(painter, Qt::AlignBottom|Qt::AlignHCenter, rect); break; } @@ -2317,8 +2317,8 @@ void JKQTPhorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { -JKQTPhorizontalIndependentAxis::JKQTPhorizontalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQtBasePlotter* parent): - JKQTPhorizontalAxis(parent) +JKQTPHorizontalIndependentAxis::JKQTPHorizontalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent): + JKQTPHorizontalAxis(parent) { this->axisOffset=axisOffset; this->axisWidth=axisWidth; @@ -2327,44 +2327,44 @@ JKQTPhorizontalIndependentAxis::JKQTPhorizontalIndependentAxis(double axisOffset this->otherAxisInverted=false; } -void JKQTPhorizontalIndependentAxis::set_axisOffset(double __value) { +void JKQTPHorizontalIndependentAxis::set_axisOffset(double __value) { this->axisOffset = __value; this->paramsChanged=true; update_plot(); } -void JKQTPhorizontalIndependentAxis::set_axisWidth(double __value) { +void JKQTPHorizontalIndependentAxis::set_axisWidth(double __value) { this->axisWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPhorizontalIndependentAxis::set_otherAxisOffset(double __value) { +void JKQTPHorizontalIndependentAxis::set_otherAxisOffset(double __value) { this->otherAxisOffset = __value; this->paramsChanged=true; update_plot(); } -void JKQTPhorizontalIndependentAxis::set_otherAxisWidth(double __value) { +void JKQTPHorizontalIndependentAxis::set_otherAxisWidth(double __value) { this->otherAxisWidth = __value; this->paramsChanged=true; update_plot(); } -void JKQTPhorizontalIndependentAxis::set_otherAxisInverted(bool __value) { +void JKQTPHorizontalIndependentAxis::set_otherAxisInverted(bool __value) { this->otherAxisInverted = __value; this->paramsChanged=true; update_plot(); } -double JKQTPhorizontalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } +double JKQTPHorizontalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } -double JKQTPhorizontalIndependentAxis::get_parent_plotoffset() const { return axisOffset; } +double JKQTPHorizontalIndependentAxis::get_parent_plotoffset() const { return axisOffset; } -double JKQTPhorizontalIndependentAxis::get_parent_otheraxis_width() const { return otherAxisWidth; } +double JKQTPHorizontalIndependentAxis::get_parent_otheraxis_width() const { return otherAxisWidth; } -bool JKQTPhorizontalIndependentAxis::get_parent_otheraxis_inverted() const { return otherAxisInverted; } +bool JKQTPHorizontalIndependentAxis::get_parent_otheraxis_inverted() const { return otherAxisInverted; } -double JKQTPhorizontalIndependentAxis::get_parent_otheraxis_offset() const { return otherAxisOffset; } +double JKQTPHorizontalIndependentAxis::get_parent_otheraxis_offset() const { return otherAxisOffset; } diff --git a/lib/jkqtplotter/jkqtpbaseelements.h b/lib/jkqtplotter/jkqtpbaseelements.h index 6d52b83889..d0133f3c09 100644 --- a/lib/jkqtplotter/jkqtpbaseelements.h +++ b/lib/jkqtplotter/jkqtpbaseelements.h @@ -36,7 +36,7 @@ #include "jkqtplottertools/jkqtp_imexport.h" // forward declarations -class JKQtBasePlotter; +class JKQTBasePlotter; /*! \brief this virtual class is the base for any type of coordinate axis, to be drawn by JKQTplotterBase. \ingroup jkqtpbaseplotter_elements @@ -49,7 +49,7 @@ class JKQtBasePlotter; . Most of the actual draw and measure functions have to be implemented in descendents of this class (namely - JKQTPhorizontalAxis and JKQTPverticalAxis, as they are specific to whether the axis is drawn horizontally or + JKQTPHorizontalAxis and JKQTPVerticalAxis, as they are specific to whether the axis is drawn horizontally or vertically. Each axis is split up into several parts, as depicted in this image: @@ -137,16 +137,16 @@ 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 LIB_EXPORT JKQTPCoordinateAxis: public QObject { Q_OBJECT protected: public: /** \brief class constructor */ - explicit JKQTPcoordinateAxis(JKQtBasePlotter* parent); + explicit JKQTPCoordinateAxis(JKQTBasePlotter* parent); /** \brief class destructor */ - virtual ~JKQTPcoordinateAxis(); - virtual void set_parent(JKQtBasePlotter* parent); + virtual ~JKQTPCoordinateAxis(); + virtual void set_parent(JKQTBasePlotter* parent); /** \brief loads the plot properties from a QSettings object */ virtual void loadSettings(QSettings& settings, QString group=QString("plots")); @@ -157,7 +157,7 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { virtual void saveSettings(QSettings& settings, QString group=QString("plots")); /** \brief load settings from other axis */ - virtual void loadSettings(JKQTPcoordinateAxis* settings); + virtual void loadSettings(JKQTPCoordinateAxis* settings); /** \brief return x-pixel coordinate from time coordinate */ inline double x2p(double x) const { @@ -238,11 +238,11 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /*! \brief returns the property userLogTickSpacing. \details Description of the parameter userLogTickSpacing is:
\copybrief userLogTickSpacing
. \see userLogTickSpacing for more information */ inline double get_userLogTickSpacing() const { return this->userLogTickSpacing; } /*! \brief returns the property labelType. \details Description of the parameter labelType is:
\copybrief labelType
. \see labelType for more information */ - inline JKQTPCAlabelType get_labelType() const { return this->labelType; } + inline JKQTPCALabelType get_labelType() const { return this->labelType; } /*! \brief returns the property axisLabel. \details Description of the parameter axisLabel is:
\copybrief axisLabel
. \see axisLabel for more information */ inline QString get_axisLabel() const { return this->axisLabel; } /*! \brief returns the property labelPosition. \details Description of the parameter labelPosition is:
\copybrief labelPosition
. \see labelPosition for more information */ - inline JKQTPlabelPosition get_labelPosition() const { return this->labelPosition; } + inline JKQTPLabelPosition get_labelPosition() const { return this->labelPosition; } /*! \brief returns the property labelFont. \details Description of the parameter labelFont is:
\copybrief labelFont
. \see labelFont for more information */ inline QString get_labelFont() const { return this->labelFont; } /*! \brief returns the property labelFontSize. \details Description of the parameter labelFontSize is:
\copybrief labelFontSize
. \see labelFontSize for more information */ @@ -291,9 +291,9 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { inline JKQTPLabelTickMode get_tickMode() const { return this->tickMode; } /*! \brief returns the property drawMode1. \details Description of the parameter drawMode1 is:
\copybrief drawMode1
. \see drawMode1 for more information */ - inline JKQTPCAdrawMode get_drawMode1() const { return this->drawMode1; } + inline JKQTPCADrawMode get_drawMode1() const { return this->drawMode1; } /*! \brief returns the property drawMode2. \details Description of the parameter drawMode2 is:
\copybrief drawMode2
. \see drawMode2 for more information */ - inline JKQTPCAdrawMode get_drawMode2() const { return this->drawMode2; } + inline JKQTPCADrawMode get_drawMode2() const { return this->drawMode2; } /*! \brief returns the property minorTickWidth. \details Description of the parameter minorTickWidth is:
\copybrief minorTickWidth
. \see minorTickWidth for more information */ inline double get_minorTickWidth() const { return this->minorTickWidth; } /*! \brief returns the property tickWidth. \details Description of the parameter tickWidth is:
\copybrief tickWidth
. \see tickWidth for more information */ @@ -325,7 +325,7 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { return this->autoLabelDigits; } /*! \brief returns the property parent. \details Description of the parameter parent is:
\copybrief parent
. \see parent for more information */ - inline JKQtBasePlotter* get_parent() const { return this->parent; } + inline JKQTBasePlotter* get_parent() const { return this->parent; } /*! \brief sets the property doUpdateScaling to the specified \a __value. \details Description of the parameter doUpdateScaling is:
\copybrief doUpdateScaling
\see doUpdateScaling for more information */ @@ -414,7 +414,7 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief sets the property labelType to the specified \a __value. * \details Description of the parameter labelType is:
\copybrief labelType
* \see labelType for more information */ - virtual void set_labelType (JKQTPCAlabelType __value); + virtual void set_labelType (JKQTPCALabelType __value); /** \brief sets the property tickMode to the specified \a __value. * \details Description of the parameter tickMode is:
\copybrief tickMode
@@ -432,7 +432,7 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief sets the property labelPosition to the specified \a __value. * \details Description of the parameter labelPosition is:
\copybrief labelPosition
*/ - virtual void set_labelPosition (JKQTPlabelPosition __value); + virtual void set_labelPosition (JKQTPLabelPosition __value); /** \brief sets the property labelFont to the specified \a __value. * \details Description of the parameter labelFont is:
\copybrief labelFont
*/ @@ -541,11 +541,11 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief sets the property drawMode1 to the specified \a __value. * \details Description of the parameter drawMode1 is:
\copybrief drawMode1
*/ - virtual void set_drawMode1 (JKQTPCAdrawMode __value); + virtual void set_drawMode1 (JKQTPCADrawMode __value); /** \brief sets the property drawMode2 to the specified \a __value. * \details Description of the parameter drawMode2 is:
\copybrief drawMode2
*/ - virtual void set_drawMode2(JKQTPCAdrawMode __value); + virtual void set_drawMode2(JKQTPCADrawMode __value); /** \brief sets the property minorTickWidth to the specified \a __value. * \details Description of the parameter minorTickWidth is:
\copybrief minorTickWidth
*/ @@ -611,8 +611,8 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { virtual bool get_parent_otheraxis_inverted() const=0; /** \brief pixel offset of (perpendicular) other axis (needed for grids) */ virtual double get_parent_otheraxis_offset() const=0; - /** \brief retun parents JKQTmathText* object */ - virtual JKQTmathText* get_parent_mathText(); + /** \brief retun parents JKQTMathText* object */ + virtual JKQTMathText* get_parent_mathText(); /** \brief convert a float to a tick label string */ @@ -621,7 +621,7 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief convert a float to a tick label string with a given precision */ QString floattolabel(double data, int past_comma); /** \brief parent plotter class */ - JKQtBasePlotter* parent; + JKQTBasePlotter* parent; /** \brief current view: minimum of time axis */ double axismin; /** \brief current view: maximum of time axis */ @@ -686,9 +686,9 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { double def_userLogTickSpacing; /** \brief indicates how to draw the labels */ - JKQTPCAlabelType labelType; + JKQTPCALabelType labelType; /*! \brief default value for property property varname. \see labelType for more information */ - JKQTPCAlabelType def_labelType; + JKQTPCALabelType def_labelType; /** \brief mode of the major ticks */ JKQTPLabelTickMode tickMode; @@ -699,9 +699,9 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { QString axisLabel; /** \brief position of the axis label */ - JKQTPlabelPosition labelPosition; + JKQTPLabelPosition labelPosition; /*! \brief default value for property property varname. \see labelPosition for more information */ - JKQTPlabelPosition def_labelPosition; + JKQTPLabelPosition def_labelPosition; /** \brief font of the axis labels */ QString labelFont; /*! \brief default value for property property varname. \see labelFont for more information */ @@ -733,13 +733,13 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief draw mode of the main (left/bottom) axis */ - JKQTPCAdrawMode drawMode1; + JKQTPCADrawMode drawMode1; /*! \brief default value for property property varname. \see drawMode1 for more information */ - JKQTPCAdrawMode def_drawMode1; + JKQTPCADrawMode def_drawMode1; /** \brief draw mode of the secondary (right/top) axis */ - JKQTPCAdrawMode drawMode2; + JKQTPCADrawMode drawMode2; /*! \brief default value for property property varname. \see drawMode2 for more information */ - JKQTPCAdrawMode def_drawMode2; + JKQTPCADrawMode def_drawMode2; /** \brief line width of minor ticks in pixels */ double minorTickWidth; /*! \brief default value for property property varname. \see minorTickWidth for more information */ @@ -905,16 +905,16 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { -/*! \brief implements a vertical axis, based on JKQTPcoordinateAxis (for most of documentation: see JKQTPcoordinateAxis). +/*! \brief implements a vertical axis, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoordinateAxis). \ingroup jkqtpbaseplotter_elements */ -class LIB_EXPORT JKQTPverticalAxis: public JKQTPcoordinateAxis { +class LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis { Q_OBJECT protected: public: /** \brief class constructor */ - JKQTPverticalAxis(JKQtBasePlotter* parent); + JKQTPVerticalAxis(JKQTBasePlotter* parent); /** \brief returns the size of the left/bottom axis in pixels */ virtual QSize getSize1(JKQTPEnhancedPainter& painter) override; @@ -945,17 +945,17 @@ class LIB_EXPORT JKQTPverticalAxis: public JKQTPcoordinateAxis { }; -/*! \brief implements a position-indipendent vertical axis, based on JKQTPcoordinateAxis (for most of documentation: see JKQTPcoordinateAxis). +/*! \brief implements a position-indipendent vertical axis, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoordinateAxis). \ingroup jkqtpbaseplotter_elements This axis may be draw at a user-supplied position (used e.g. for color bar axes) */ -class LIB_EXPORT JKQTPverticalIndependentAxis: public JKQTPverticalAxis { +class LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis { Q_OBJECT protected: public: /** \brief class constructor */ - JKQTPverticalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQtBasePlotter* parent); + JKQTPVerticalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent); /** \brief set the axis offset */ virtual void set_axisOffset(double __value) ; /** \brief set the axis width */ @@ -986,16 +986,16 @@ class LIB_EXPORT JKQTPverticalIndependentAxis: public JKQTPverticalAxis { -/*! \brief implements a horizontal axis, based on JKQTPcoordinateAxis (for most of documentation: see JKQTPcoordinateAxis). +/*! \brief implements a horizontal axis, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoordinateAxis). \ingroup jkqtpbaseplotter_elements */ -class LIB_EXPORT JKQTPhorizontalAxis: public JKQTPcoordinateAxis { +class LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis { Q_OBJECT protected: public: /** \brief class constructor */ - JKQTPhorizontalAxis(JKQtBasePlotter* parent); + JKQTPHorizontalAxis(JKQTBasePlotter* parent); /** \brief returns the size of the left/bottom axis in pixels */ virtual QSize getSize1(JKQTPEnhancedPainter& painter) override; @@ -1027,17 +1027,17 @@ class LIB_EXPORT JKQTPhorizontalAxis: public JKQTPcoordinateAxis { }; -/*! \brief implements a position-indipendent horizontal axis, based on JKQTPcoordinateAxis (for most of documentation: see JKQTPcoordinateAxis). +/*! \brief implements a position-indipendent horizontal axis, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoordinateAxis). \ingroup jkqtpbaseplotter_elements This axis may be draw at a user-supplied position (used e.g. for color bar axes) */ -class LIB_EXPORT JKQTPhorizontalIndependentAxis: public JKQTPhorizontalAxis { +class LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis { Q_OBJECT protected: public: /** \brief class constructor */ - JKQTPhorizontalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQtBasePlotter* parent); + JKQTPHorizontalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent); /** \brief se the axis offset */ virtual void set_axisOffset(double __value); /** \brief se the axis width */ diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 9b7f09a108..087a041caf 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -60,38 +60,38 @@ static QString globalUserSettigsFilename=""; static QString globalUserSettigsPrefix=""; -static QList jkqtpPaintDeviceAdapters; -static QList jkqtpSaveDataAdapters; +static QList jkqtpPaintDeviceAdapters; +static QList jkqtpSaveDataAdapters; -void initJKQtBasePlotterResources() +void initJKQTBasePlotterResources() { Q_INIT_RESOURCE(jkqtpbaseplotter); - initJKQTmathTextResources(); + initJKQTMathTextResources(); } -JKQtBasePlotter::JKQtBasePlotter() +JKQTBasePlotter::JKQTBasePlotter() { - initJKQtBasePlotterResources(); + initJKQTBasePlotterResources(); } -void JKQtBasePlotter::setDefaultJKQtBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix) +void JKQTBasePlotter::setDefaultJKQTBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix) { globalUserSettigsFilename=userSettigsFilename; globalUserSettigsPrefix=userSettigsPrefix; } -void JKQtBasePlotter::registerPaintDeviceAdapter(JKQtBasePlotter::JKQTPPaintDeviceAdapter *adapter) +void JKQTBasePlotter::registerPaintDeviceAdapter(JKQTBasePlotter::JKQTPPaintDeviceAdapter *adapter) { jkqtpPaintDeviceAdapters.append(adapter); } -void JKQtBasePlotter::deregisterPaintDeviceAdapter(JKQtBasePlotter::JKQTPPaintDeviceAdapter *adapter) +void JKQTBasePlotter::deregisterPaintDeviceAdapter(JKQTBasePlotter::JKQTPPaintDeviceAdapter *adapter) { if (jkqtpPaintDeviceAdapters.contains(adapter)) jkqtpPaintDeviceAdapters.removeAll(adapter); } -bool JKQtBasePlotter::registerSaveDataAdapter(JKQtBasePlotter::JKQTPSaveDataAdapter *adapter) +bool JKQTBasePlotter::registerSaveDataAdapter(JKQTBasePlotter::JKQTPSaveDataAdapter *adapter) { if (adapter){ QString format=adapter->getFilter(); @@ -106,22 +106,22 @@ bool JKQtBasePlotter::registerSaveDataAdapter(JKQtBasePlotter::JKQTPSaveDataAdap return false; } -bool JKQtBasePlotter::deregisterSaveDataAdapter(JKQtBasePlotter::JKQTPSaveDataAdapter *adapter) +bool JKQTBasePlotter::deregisterSaveDataAdapter(JKQTBasePlotter::JKQTPSaveDataAdapter *adapter) { if (jkqtpSaveDataAdapters.contains(adapter)) jkqtpSaveDataAdapters.removeAll(adapter); return true; } -JKQtBasePlotter::textSizeData JKQtBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter& painter) +JKQTBasePlotter::textSizeData JKQTBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter& painter) { return getTextSizeDetail(fm.family(), fm.pointSizeF(), text, painter); } -JKQtBasePlotter::textSizeData JKQtBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter& painter) +JKQTBasePlotter::textSizeData JKQTBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter& painter) { - JKQtBasePlotter::textSizeKey dh(fontName, fontSize, text, painter.device()); + JKQTBasePlotter::textSizeKey dh(fontName, fontSize, text, painter.device()); if (tbrh.contains(dh)) return tbrh[dh]; - JKQtBasePlotter::textSizeData d; + JKQTBasePlotter::textSizeData d; mathText.set_fontRoman(fontName); mathText.set_fontSize(fontSize); mathText.parse(text); @@ -131,28 +131,28 @@ JKQtBasePlotter::textSizeData JKQtBasePlotter::getTextSizeDetail(const QString & return d; } -void JKQtBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos) +void JKQTBasePlotter::getTextSizeDetail(const QString &fontName, double fontSize, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos) { - JKQtBasePlotter::textSizeData d=getTextSizeDetail(fontName, fontSize, text, painter); + JKQTBasePlotter::textSizeData d=getTextSizeDetail(fontName, fontSize, text, painter); width=d.width; ascent=d.ascent; descent=d.descent; strikeoutPos=d.strikeoutPos; } -void JKQtBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos) +void JKQTBasePlotter::getTextSizeDetail(const QFont &fm, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos) { getTextSizeDetail(fm.family(), fm.pointSizeF(), text, painter, width, ascent, descent, strikeoutPos); } -QSizeF JKQtBasePlotter::getTextSizeSize(const QFont &fm, const QString &text, QPainter &painter) +QSizeF JKQTBasePlotter::getTextSizeSize(const QFont &fm, const QString &text, QPainter &painter) { return getTextSizeSize(fm.family(), fm.pointSizeF(), text, painter); } -QSizeF JKQtBasePlotter::getTextSizeSize(const QString &fontName, double fontSize, const QString &text, QPainter &painter) +QSizeF JKQTBasePlotter::getTextSizeSize(const QString &fontName, double fontSize, const QString &text, QPainter &painter) { - JKQtBasePlotter::textSizeData d=getTextSizeDetail(fontName, fontSize, text, painter); + JKQTBasePlotter::textSizeData d=getTextSizeDetail(fontName, fontSize, text, painter); return QSizeF(d.width, d.ascent+d.descent); } @@ -162,9 +162,9 @@ QSizeF JKQtBasePlotter::getTextSizeSize(const QString &fontName, double fontSize #undef JKQTBP_DEBUGTIMING /************************************************************************************************************************** - * JKQtPlotterBase + * JKQTPLotterBase **************************************************************************************************************************/ -JKQtBasePlotter::JKQtBasePlotter(bool datastore_internal, QObject* parent, JKQTPdatastore* datast): +JKQTBasePlotter::JKQTBasePlotter(bool datastore_internal, QObject* parent, JKQTPDatastore* datast): QObject(parent), m_plotsModel(nullptr), xAxis(nullptr), yAxis(nullptr) { @@ -189,16 +189,16 @@ JKQtBasePlotter::JKQtBasePlotter(bool datastore_internal, QObject* parent, JKQTP currentPrinter=QPrinterInfo::defaultPrinter().printerName(); if (datastore_internal) { - datastore=new JKQTPdatastore(); + datastore=new JKQTPDatastore(); datastoreInternal=true; } else { datastore=datast; datastoreInternal=false; } - xAxis=new JKQTPhorizontalAxis(this); - yAxis=new JKQTPverticalAxis(this); - m_plotsModel=new JKQTPgraphsModel(this); + xAxis=new JKQTPHorizontalAxis(this); + yAxis=new JKQTPVerticalAxis(this); + m_plotsModel=new JKQTPGraphsModel(this); connect(this, SIGNAL(plotUpdated()), m_plotsModel, SLOT(plotUpdated())); @@ -214,48 +214,48 @@ JKQtBasePlotter::JKQtBasePlotter(bool datastore_internal, QObject* parent, JKQTP emitSignals=true; - actSavePlot=new QAction(QIcon(":/JKQTPlotter/jkqtp_saveplot.png"), "Save Plot", this); + actSavePlot=new QAction(QIcon(":/JKQTPLotter/jkqtp_saveplot.png"), "Save Plot", this); actSavePlot->setToolTip("Save plot as image file (PDF, PS; PNG, ...)."); - actSaveData=new QAction(QIcon(":/JKQTPlotter/jkqtp_savedata.png"), "Save Data", this); + actSaveData=new QAction(QIcon(":/JKQTPLotter/jkqtp_savedata.png"), "Save Data", this); actSaveData->setToolTip("Save Data of the plot as file (CSV, ...)."); - actCopyData=new QAction(QIcon(":/JKQTPlotter/jkqtp_copydata.png"), "Copy Data", this); + actCopyData=new QAction(QIcon(":/JKQTPLotter/jkqtp_copydata.png"), "Copy Data", this); actCopyData->setToolTip("Copy Data of the plot to the clipboard to be pasted into Excel etc."); - actCopyMatlab=new QAction(QIcon(":/JKQTPlotter/jkqtp_copymatlab.png"), "Copy Data to Matlab", this); + actCopyMatlab=new QAction(QIcon(":/JKQTPLotter/jkqtp_copymatlab.png"), "Copy Data to Matlab", this); actCopyMatlab->setToolTip("Copy Data of the plot to the clipboard in Matlab script format."); - actCopyPixelImage=new QAction(QIcon(":/JKQTPlotter/jkqtp_copyimg.png"), "Copy Image", this); + actCopyPixelImage=new QAction(QIcon(":/JKQTPLotter/jkqtp_copyimg.png"), "Copy Image", this); actCopyPixelImage->setToolTip("Copy the plot as a pixel image to the clipboard"); - actSavePDF=new QAction(QIcon(":/JKQTPlotter/jkqtp_savepdf.png"), "Save P&DF", this); + actSavePDF=new QAction(QIcon(":/JKQTPLotter/jkqtp_savepdf.png"), "Save P&DF", this); actSavePDF->setToolTip("Save as PDF"); //toolbar->addAction(actSavePDF); #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - actSavePS=new QAction(QIcon(":/JKQTPlotter/jkqtp_saveps.png"), "Save P&S", this); + actSavePS=new QAction(QIcon(":/JKQTPLotter/jkqtp_saveps.png"), "Save P&S", this); actSavePS->setToolTip("Save as PostScript"); //toolbar->addAction(actSavePS); #endif - actSaveSVG=new QAction(QIcon(":/JKQTPlotter/jkqtp_savesvg.png"), "Save S&VG", this); + actSaveSVG=new QAction(QIcon(":/JKQTPLotter/jkqtp_savesvg.png"), "Save S&VG", this); actSaveSVG->setToolTip("Save as Scalable Vector Graphics (SVG)"); //toolbar->addAction(actSaveSVG); - actSavePix=new QAction(QIcon(":/JKQTPlotter/jkqtp_savepix.png"), "Save &Image", this); + actSavePix=new QAction(QIcon(":/JKQTPLotter/jkqtp_savepix.png"), "Save &Image", this); actSavePix->setToolTip("Save as Pixel Image (PNG, JPEG, TIFF ...)"); //toolbar->addAction(actSavePix); - actPrint=new QAction(QIcon(":/JKQTPlotter/jkqtp_print.png"), "&Print", this); + actPrint=new QAction(QIcon(":/JKQTPLotter/jkqtp_print.png"), "&Print", this); actPrint->setToolTip("Print"); //toolbar->addSeparator(); - actSaveCSV=new QAction(QIcon(":/JKQTPlotter/jkqtp_savecsv.png"), "Save &CSV", this); + actSaveCSV=new QAction(QIcon(":/JKQTPLotter/jkqtp_savecsv.png"), "Save &CSV", this); actSaveCSV->setToolTip("Save the data which is used for the plot as Comma Separated Values (CSV)"); //toolbar->addAction(actSaveCSV); //toolbar->addSeparator(); - actZoomAll=new QAction(QIcon(":/JKQTPlotter/jkqtp_zoomall.png"), "Zoom &All", this); + actZoomAll=new QAction(QIcon(":/JKQTPLotter/jkqtp_zoomall.png"), "Zoom &All", this); actZoomAll->setToolTip("Zoom to view all data"); - actZoomIn=new QAction(QIcon(":/JKQTPlotter/jkqtp_zoomin.png"), "Zoom &In", this); + actZoomIn=new QAction(QIcon(":/JKQTPLotter/jkqtp_zoomin.png"), "Zoom &In", this); actZoomIn->setToolTip("Zoom in around the center of the plot"); - actZoomOut=new QAction(QIcon(":/JKQTPlotter/jkqtp_zoomout.png"), "Zoom &Out", this); + actZoomOut=new QAction(QIcon(":/JKQTPLotter/jkqtp_zoomout.png"), "Zoom &Out", this); actZoomOut->setToolTip("Zoom out"); - actShowPlotData=new QAction(QIcon(":/JKQTPlotter/jkqtp_showplotdata.png"), "&Show Plot Data", this); + actShowPlotData=new QAction(QIcon(":/JKQTPLotter/jkqtp_showplotdata.png"), "&Show Plot Data", this); actShowPlotData->setToolTip("opens a dialog that contains all data used for the plot in a table."); @@ -286,19 +286,19 @@ JKQtBasePlotter::JKQtBasePlotter(bool datastore_internal, QObject* parent, JKQTP #endif } -JKQtBasePlotter::~JKQtBasePlotter(){ +JKQTBasePlotter::~JKQTBasePlotter(){ clearGraphs(false); if (datastoreInternal && datastore!=nullptr) delete datastore; delete xAxis; delete yAxis; } -void JKQtBasePlotter::setGrid(bool val) { +void JKQTBasePlotter::setGrid(bool val) { xAxis->set_drawGrid(val); yAxis->set_drawGrid(val); }; -void JKQtBasePlotter::useExternalDatastore(JKQTPdatastore* newStore){ +void JKQTBasePlotter::useExternalDatastore(JKQTPDatastore* newStore){ if (datastoreInternal && datastore!=nullptr) { delete datastore; datastore=nullptr; @@ -307,7 +307,7 @@ void JKQtBasePlotter::useExternalDatastore(JKQTPdatastore* newStore){ datastoreInternal=false; }; -void JKQtBasePlotter::useAsInternalDatastore(JKQTPdatastore* newStore){ +void JKQTBasePlotter::useAsInternalDatastore(JKQTPDatastore* newStore){ if (datastoreInternal && datastore!=nullptr) { delete datastore; datastore=nullptr; @@ -317,25 +317,25 @@ void JKQtBasePlotter::useAsInternalDatastore(JKQTPdatastore* newStore){ if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::useInternalDatastore(){ +void JKQTBasePlotter::useInternalDatastore(){ if (!datastoreInternal) { - datastore=new JKQTPdatastore(); + datastore=new JKQTPDatastore(); datastoreInternal=true; } if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::forceInternalDatastore(){ +void JKQTBasePlotter::forceInternalDatastore(){ if (datastoreInternal && datastore!=nullptr) { delete datastore; datastore=nullptr; } - datastore=new JKQTPdatastore(); + datastore=new JKQTPDatastore(); datastoreInternal=true; if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::initSettings() { +void JKQTBasePlotter::initSettings() { useClipping=true; //doDrawing=true; @@ -384,8 +384,8 @@ void JKQtBasePlotter::initSettings() { def_key_line_length=3; key_line_length=def_key_line_length; def_keyXMargin=0.5; keyXMargin=def_keyXMargin; def_keyYMargin=0.5; keyYMargin=def_keyYMargin; - def_keyPosition=JKQTPkeyInsideTopRight; keyPosition=def_keyPosition; - def_keyLayout=JKQTPkeyLayoutOneColumn; keyLayout=def_keyLayout; + def_keyPosition=JKQTPKeyInsideTopRight; keyPosition=def_keyPosition; + def_keyLayout=JKQTPKeyLayoutOneColumn; keyLayout=def_keyLayout; def_keyAutosize=true; keyAutosize=def_keyAutosize; def_exportBackgroundColor=QColor("white"); exportBackgroundColor=def_exportBackgroundColor; @@ -412,8 +412,8 @@ void JKQtBasePlotter::initSettings() { for (int i=0; idelta()/120.0<<": "<(round(static_cast(plotWidth)/2.0-static_cast(plotWidth)/(2.0*factor)))); double xmax=p2x(static_cast(round(static_cast(plotWidth)/2.0+static_cast(plotWidth)/(2.0*factor)))); @@ -451,7 +451,7 @@ void JKQtBasePlotter::zoomIn(double factor) { if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this); } -void JKQtBasePlotter::zoom(double nxmin, double nxmax, double nymin, double nymax){ +void JKQTBasePlotter::zoom(double nxmin, double nxmax, double nymin, double nymax){ // only react on double clicks inside event double xmin=nxmin; double xmax=nxmax; @@ -463,7 +463,7 @@ void JKQtBasePlotter::zoom(double nxmin, double nxmax, double nymin, double nyma if (emitPlotSignals) emit plotUpdated(); if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this); } -void JKQtBasePlotter::resize(int wid, int heigh) { +void JKQTBasePlotter::resize(int wid, int heigh) { widgetWidth=wid; widgetHeight=heigh; @@ -471,17 +471,17 @@ void JKQtBasePlotter::resize(int wid, int heigh) { } -void JKQtBasePlotter::setWidth(int wid) { +void JKQTBasePlotter::setWidth(int wid) { widgetWidth=wid; if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::setHeight(int heigh) { +void JKQTBasePlotter::setHeight(int heigh) { widgetHeight=heigh; if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::saveSettings(QSettings& settings, QString group){ +void JKQTBasePlotter::saveSettings(QSettings& settings, QString group){ QString g=group+"/"; if (group.isEmpty()) g=""; @@ -503,22 +503,22 @@ void JKQtBasePlotter::saveSettings(QSettings& settings, QString group){ if (keyYMargin!=def_keyYMargin) settings.setValue(g+"key_ymargin", keyYMargin); if (keyXSeparation!=def_keyXSeparation) settings.setValue(g+"key_xseparation", keyXSeparation); if (keyYSeparation!=def_keyYSeparation) settings.setValue(g+"key_yseparation", keyYSeparation); - if (keyFrameColor!=def_keyFrameColor) settings.setValue(g+"key_frame_color", JKQTP_QColor2String(keyFrameColor)); + if (keyFrameColor!=def_keyFrameColor) settings.setValue(g+"key_frame_color", jkqtp_QColor2String(keyFrameColor)); if (keyFrameWidth!=def_keyFrameWidth) settings.setValue(g+"key_frame_width", keyFrameWidth); if (showKeyFrame!=def_showKeyFrame) settings.setValue(g+"show_key_frame", showKeyFrame); - if (keyBackgroundColor!=def_keyBackgroundColor) settings.setValue(g+"key_background_color", JKQTP_QColor2String(keyBackgroundColor)); + if (keyBackgroundColor!=def_keyBackgroundColor) settings.setValue(g+"key_background_color", jkqtp_QColor2String(keyBackgroundColor)); if (showKey!=def_showKey) settings.setValue(g+"show_key", showKey); - if (keyPosition!=def_keyPosition) settings.setValue(g+"key_position", JKQTPkeyPosition2String(keyPosition)); - if (keyLayout!=def_keyLayout) settings.setValue(g+"key_layout", JKQTPkeyLayout2String(keyLayout)); + if (keyPosition!=def_keyPosition) settings.setValue(g+"key_position", JKQTPKeyPosition2String(keyPosition)); + if (keyLayout!=def_keyLayout) settings.setValue(g+"key_layout", JKQTPKeyLayout2String(keyLayout)); if (useAntiAliasingForSystem!=def_useAntiAliasingForSystem) settings.setValue(g+"use_antialiasing_for_system", useAntiAliasingForSystem); if (useAntiAliasingForGraphs!=def_useAntiAliasingForGraphs) settings.setValue(g+"use_antialiasing_for_graphs", useAntiAliasingForGraphs); if (useAntiAliasingForText!=def_useAntiAliasingForText) settings.setValue(g+"use_antialiasing_for_text", useAntiAliasingForText); - if (backgroundColor!=def_backgroundColor) settings.setValue(g+"background_color", JKQTP_QColor2String(backgroundColor)); - if (exportBackgroundColor!=def_exportBackgroundColor) settings.setValue(g+"exportBackgroundColor", JKQTP_QColor2String(exportBackgroundColor)); - if (plotBackgroundColor!=def_plotBackgroundColor) settings.setValue(g+"plot_background_color", JKQTP_QColor2String(plotBackgroundColor)); - if (graphColor!=def_graphColor) settings.setValue(g+"graph_color", JKQTP_QColor2String(graphColor)); + if (backgroundColor!=def_backgroundColor) settings.setValue(g+"background_color", jkqtp_QColor2String(backgroundColor)); + if (exportBackgroundColor!=def_exportBackgroundColor) settings.setValue(g+"exportBackgroundColor", jkqtp_QColor2String(exportBackgroundColor)); + if (plotBackgroundColor!=def_plotBackgroundColor) settings.setValue(g+"plot_background_color", jkqtp_QColor2String(plotBackgroundColor)); + if (graphColor!=def_graphColor) settings.setValue(g+"graph_color", jkqtp_QColor2String(graphColor)); if (graphWidth!=def_graphWidth) settings.setValue(g+"graph_linewidth", graphWidth); @@ -541,7 +541,7 @@ void JKQtBasePlotter::saveSettings(QSettings& settings, QString group){ } if (palette_changed) { for (int cnt=0; cntloadSettings(settings, g+"yaxis_"); @@ -698,7 +698,7 @@ void JKQtBasePlotter::loadSettings(QSettings& settings, QString group){ -void JKQtBasePlotter::setXY(double xminn, double xmaxx, double yminn, double ymaxx){ +void JKQTBasePlotter::setXY(double xminn, double xmaxx, double yminn, double ymaxx){ xAxis->setRange(xminn, xmaxx); yAxis->setRange(yminn, ymaxx); if (maintainAxisAspectRatio) { @@ -708,7 +708,7 @@ void JKQtBasePlotter::setXY(double xminn, double xmaxx, double yminn, double yma } } -void JKQtBasePlotter::setX(double xminn, double xmaxx){ +void JKQTBasePlotter::setX(double xminn, double xmaxx){ xAxis->setRange(xminn, xmaxx); if (maintainAxisAspectRatio) { double mid=(yAxis->getMax()+yAxis->getMin())/2.0; @@ -717,7 +717,7 @@ void JKQtBasePlotter::setX(double xminn, double xmaxx){ } } -void JKQtBasePlotter::setY(double yminn, double ymaxx){ +void JKQTBasePlotter::setY(double yminn, double ymaxx){ yAxis->setRange(yminn, ymaxx); if (maintainAxisAspectRatio) { double mid=(xAxis->getMax()+xAxis->getMin())/2.0; @@ -726,27 +726,27 @@ void JKQtBasePlotter::setY(double yminn, double ymaxx){ } } -void JKQtBasePlotter::setAbsoluteX(double xminn, double xmaxx) { +void JKQTBasePlotter::setAbsoluteX(double xminn, double xmaxx) { xAxis->setAbsoluteRange(xminn, xmaxx); } -void JKQtBasePlotter::setAbsoluteY(double yminn, double ymaxx) { +void JKQTBasePlotter::setAbsoluteY(double yminn, double ymaxx) { yAxis->setAbsoluteRange(yminn, ymaxx); } -void JKQtBasePlotter::setAbsoluteXY(double xminn, double xmaxx, double yminn, double ymaxx) { +void JKQTBasePlotter::setAbsoluteXY(double xminn, double xmaxx, double yminn, double ymaxx) { xAxis->setAbsoluteRange(xminn, xmaxx); yAxis->setAbsoluteRange(yminn, ymaxx); } -void JKQtBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ +void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaat(QString("JKQtBasePlotter[%1]::calcPlotScaling()").arg(objectName())); + JKQTPAutoOutputTimer jkaat(QString("JKQTBasePlotter[%1]::calcPlotScaling()").arg(objectName())); #endif if (emitSignals) emit beforePlotScalingRecalculate(); - //qDebug()<<"start JKQtPlotterBase::calcPlotScaling"; + //qDebug()<<"start JKQTPLotterBase::calcPlotScaling"; // if the key is plotted outside , then we have to add place for it (i.e. change the plotBorders iplotBorderBottom=plotBorderBottom; iplotBorderLeft=plotBorderLeft; @@ -756,7 +756,7 @@ void JKQtBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ if (!plotLabel.isEmpty()) { - /*JKQTmathText mt; + /*JKQTMathText mt; mt.set_fontSize(plotLabelFontSize*fontSizeMultiplier); mt.set_fontRoman(plotLabelFontname); #ifdef USE_XITS_FONTS @@ -780,28 +780,28 @@ void JKQtBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ iplotKeyBorderBottom=0; iplotKeyBorderLeft=0; iplotKeyBorderRight=0; - if (keyPosition==JKQTPkeyOutsideTopRight) { + if (keyPosition==JKQTPKeyOutsideTopRight) { iplotKeyBorderTop=keyHeight+2*keyYMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyYOffset*kfm.width('X')+2; iplotBorderTop = iplotBorderTop + iplotKeyBorderTop; - } else if (keyPosition==JKQTPkeyOutsideTopLeft) { + } else if (keyPosition==JKQTPKeyOutsideTopLeft) { iplotKeyBorderTop=keyHeight+2*keyYMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyYOffset*kfm.width('X')+2; iplotBorderTop = iplotBorderTop + iplotKeyBorderTop; - } else if (keyPosition==JKQTPkeyOutsideLeftTop) { + } else if (keyPosition==JKQTPKeyOutsideLeftTop) { iplotKeyBorderLeft=keyWidth+2*keyXMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyXOffset*kfm.width('X')+2; iplotBorderLeft = iplotBorderLeft + iplotKeyBorderLeft; - } else if (keyPosition==JKQTPkeyOutsideLeftBottom) { + } else if (keyPosition==JKQTPKeyOutsideLeftBottom) { iplotKeyBorderLeft=keyWidth+2*keyXMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyXOffset*kfm.width('X')+2; iplotBorderLeft = iplotBorderLeft + iplotKeyBorderLeft; - } else if (keyPosition==JKQTPkeyOutsideBottomRight) { + } else if (keyPosition==JKQTPKeyOutsideBottomRight) { iplotKeyBorderBottom=keyHeight+2*keyYMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyYOffset*kfm.width('X')+2; iplotBorderBottom = iplotBorderBottom + iplotKeyBorderBottom; - } else if (keyPosition==JKQTPkeyOutsideBottomLeft) { + } else if (keyPosition==JKQTPKeyOutsideBottomLeft) { iplotKeyBorderBottom=keyHeight+2*keyYMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyYOffset*kfm.width('X')+2; iplotBorderBottom = iplotBorderBottom + iplotKeyBorderBottom; - } else if (keyPosition==JKQTPkeyOutsideRightTop) { + } else if (keyPosition==JKQTPKeyOutsideRightTop) { iplotKeyBorderRight = keyWidth+2*keyXMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyXOffset*kfm.width('X')+2; iplotBorderRight = iplotBorderRight + iplotKeyBorderRight; - } else if (keyPosition==JKQTPkeyOutsideRightBottom) { + } else if (keyPosition==JKQTPKeyOutsideRightBottom) { iplotKeyBorderRight = keyWidth+2*keyXMargin*kfm.width('X')+ceil(2*keyFrameWidth)+keyXOffset*kfm.width('X')+2; iplotBorderRight = iplotBorderRight + iplotKeyBorderRight; } @@ -848,7 +848,7 @@ void JKQtBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ } } - //qDebug()<<" end JKQtPlotterBase::calcPlotScaling"; + //qDebug()<<" end JKQTPLotterBase::calcPlotScaling"; // synchronize to a master-plotter @@ -945,39 +945,39 @@ void JKQtBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ } -void JKQtBasePlotter::plotSystemGrid(JKQTPEnhancedPainter& painter) { +void JKQTBasePlotter::plotSystemGrid(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::plotSystemGrid"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemGrid"); #endif - //qDebug()<<"start JKQtPlotterBase::plotSystemGrid"; + //qDebug()<<"start JKQTPLotterBase::plotSystemGrid"; xAxis->drawGrids(painter); yAxis->drawGrids(painter); - //qDebug()<<" end JKQtPlotterBase::plotSystemGrid"; + //qDebug()<<" end JKQTPLotterBase::plotSystemGrid"; } -void JKQtBasePlotter::plotSystemXAxis(JKQTPEnhancedPainter& painter) { +void JKQTBasePlotter::plotSystemXAxis(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::plotSystemXAxis"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemXAxis"); #endif - //qDebug()<<"start JKQtPlotterBase::plotSystemXAxis"; + //qDebug()<<"start JKQTPLotterBase::plotSystemXAxis"; xAxis->drawAxes(painter); - //qDebug()<<" end JKQtPlotterBase::plotSystemXAxis"; + //qDebug()<<" end JKQTPLotterBase::plotSystemXAxis"; } -void JKQtBasePlotter::plotSystemYAxis(JKQTPEnhancedPainter& painter) { +void JKQTBasePlotter::plotSystemYAxis(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::plotSystemYAxis"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemYAxis"); #endif - //qDebug()<<"start JKQtPlotterBase::plotSystemYAxis"; + //qDebug()<<"start JKQTPLotterBase::plotSystemYAxis"; yAxis->drawAxes(painter); - //qDebug()<<" end JKQtPlotterBase::plotSystemYAxis"; + //qDebug()<<" end JKQTPLotterBase::plotSystemYAxis"; } -JKQtBasePlotter::JKQTPPen JKQtBasePlotter::getPlotStyle(int i) const{ +JKQTBasePlotter::JKQTPPen JKQTBasePlotter::getPlotStyle(int i) const{ int colorI=-1; int styleI=0; for (int k=0; k<=i; k++) { @@ -998,7 +998,7 @@ JKQtBasePlotter::JKQTPPen JKQtBasePlotter::getPlotStyle(int i) const{ return p; } -int JKQtBasePlotter::getNextStyle() { +int JKQTBasePlotter::getNextStyle() { int res=0; while (usedStyles.contains(res)) res++; //std::cout<get_visible()) g->draw(painter); } @@ -1152,11 +1152,11 @@ void JKQtBasePlotter::plotOverlays(JKQTPEnhancedPainter &painter) { -void JKQtBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays) { +void JKQTBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::paintPlot"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::paintPlot"); #endif - //qDebug()<<"start JKQtPlotterBase::paintPlot"; + //qDebug()<<"start JKQTPLotterBase::paintPlot"; // draw background painter.save(); painter.setPen(backgroundColor); @@ -1194,10 +1194,10 @@ void JKQtBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays if (showKey) plotKey(painter); painter.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing, useAntiAliasingForText); if (drawOverlays) plotOverlays(painter); - //qDebug()<<" end JKQtPlotterBase::paintPlot"; + //qDebug()<<" end JKQTPLotterBase::paintPlot"; } -void JKQtBasePlotter::paintOverlays(JKQTPEnhancedPainter &painter) { +void JKQTBasePlotter::paintOverlays(JKQTPEnhancedPainter &painter) { painter.setRenderHint(JKQTPEnhancedPainter::NonCosmeticDefaultPen, true); painter.setRenderHint(JKQTPEnhancedPainter::Antialiasing, useAntiAliasingForGraphs); painter.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing, useAntiAliasingForText); @@ -1206,7 +1206,7 @@ void JKQtBasePlotter::paintOverlays(JKQTPEnhancedPainter &painter) { painter.restore(); } -void JKQtBasePlotter::gridPrintingCalc() { +void JKQTBasePlotter::gridPrintingCalc() { gridPrintingRows.clear(); gridPrintingColumns.clear(); if (!gridPrinting) { @@ -1248,9 +1248,9 @@ void JKQtBasePlotter::gridPrintingCalc() { } } -void JKQtBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, bool drawOverlays, bool scaleIfTooLarge, bool scaleIfTooSmall) { +void JKQTBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, bool drawOverlays, bool scaleIfTooLarge, bool scaleIfTooSmall) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::gridPaint"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::gridPaint"); #endif calcPlotScaling(painter); @@ -1342,7 +1342,7 @@ void JKQtBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, } -void JKQtBasePlotter::gridPaintOverlays(JKQTPEnhancedPainter &painter, QSizeF pageRect) +void JKQTBasePlotter::gridPaintOverlays(JKQTPEnhancedPainter &painter, QSizeF pageRect) { if (!gridPrinting) { double scale=(double)pageRect.width()/(double)widgetWidth*paintMagnification; @@ -1401,7 +1401,7 @@ void JKQtBasePlotter::gridPaintOverlays(JKQTPEnhancedPainter &painter, QSizeF pa } -void JKQtBasePlotter::print(QPrinter* printer, bool displayPreview) { +void JKQTBasePlotter::print(QPrinter* printer, bool displayPreview) { loadUserSettings(); QPrinter* p=printer; bool delP=false; @@ -1439,7 +1439,7 @@ void JKQtBasePlotter::print(QPrinter* printer, bool displayPreview) { } -void JKQtBasePlotter::printpreview(QPrinter *p, bool setabsolutesize) { +void JKQTBasePlotter::printpreview(QPrinter *p, bool setabsolutesize) { double lw=lineWidthMultiplier; double fs=fontSizeMultiplier; QColor bc=backgroundColor; @@ -1462,7 +1462,7 @@ void JKQtBasePlotter::printpreview(QPrinter *p, bool setabsolutesize) { QGridLayout* layout=new QGridLayout(); dlg->setLayout(layout); dlg->setWindowTitle(tr("Graph print/export preview ...")); - dlg->setWindowIcon(QIcon(":/JKQTPlotter/jkqtp_exportprintpreview.png")); + dlg->setWindowIcon(QIcon(":/JKQTPLotter/jkqtp_exportprintpreview.png")); printPreview=new QPrintPreviewWidget(p, dlg); connect(printPreview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printpreviewPaintRequested(QPrinter*))); @@ -1581,7 +1581,7 @@ void JKQtBasePlotter::printpreview(QPrinter *p, bool setabsolutesize) { } -bool JKQtBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolutePaperSize, double printsizeX_inMM, double printsizeY_inMM, bool displayPreview) { +bool JKQTBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolutePaperSize, double printsizeX_inMM, double printsizeY_inMM, bool displayPreview) { QPrinter *printer=dynamic_cast(paintDevice); QSvgGenerator* svg=dynamic_cast(paintDevice); double lw=lineWidthMultiplier; @@ -1626,7 +1626,7 @@ bool JKQtBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolut QGridLayout* layout=new QGridLayout(); dlg->setLayout(layout); dlg->setWindowTitle(tr("Graph print/export preview ...")); - dlg->setWindowIcon(QIcon(":/JKQTPlotter/jkqtp_exportprintpreview.png")); + dlg->setWindowIcon(QIcon(":/JKQTPLotter/jkqtp_exportprintpreview.png")); bool delPrinter=false; if (svg) { @@ -1801,7 +1801,7 @@ bool JKQtBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolut } -bool JKQtBasePlotter::exportpreview(QSizeF pageSize, bool unitIsMM) { +bool JKQTBasePlotter::exportpreview(QSizeF pageSize, bool unitIsMM) { printPreview=nullptr; printSizeX_Millimeter=pageSize.width(); printSizeY_Millimeter=pageSize.height(); @@ -1819,7 +1819,7 @@ bool JKQtBasePlotter::exportpreview(QSizeF pageSize, bool unitIsMM) { QGridLayout* layout=new QGridLayout(); dlg->setLayout(layout); dlg->setWindowTitle(tr("Graph export preview ...")); - dlg->setWindowIcon(QIcon(":/JKQTPlotter/jkqtp_exportprintpreview.png")); + dlg->setWindowIcon(QIcon(":/JKQTPLotter/jkqtp_exportprintpreview.png")); /*printPreview=new QPrintPreviewWidget(p, dlg); connect(printPreview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printpreviewPaintRequested(QPrinter*)));*/ QScrollArea* scroll=new QScrollArea(dlg); @@ -1945,7 +1945,7 @@ bool JKQtBasePlotter::exportpreview(QSizeF pageSize, bool unitIsMM) { return result; } -void JKQtBasePlotter::updatePreviewLabel() { +void JKQTBasePlotter::updatePreviewLabel() { double factor=1; if (exportUnitInMM) factor=600.0/double(printSizeX_Millimeter); QImage pix(double(printSizeX_Millimeter)*factor*1.1, double(printSizeY_Millimeter)*factor*1.1, QImage::Format_ARGB32); @@ -1962,7 +1962,7 @@ void JKQtBasePlotter::updatePreviewLabel() { } } -void JKQtBasePlotter::printpreviewPaintRequested(QPrinter* printer) { +void JKQTBasePlotter::printpreviewPaintRequested(QPrinter* printer) { double lw=lineWidthMultiplier; double fs=fontSizeMultiplier; QColor bc=backgroundColor; @@ -2038,13 +2038,13 @@ void JKQtBasePlotter::printpreviewPaintRequested(QPrinter* printer) { } -void JKQtBasePlotter::printpreviewPaintRequestedNew(QPrinter* printer) { +void JKQTBasePlotter::printpreviewPaintRequestedNew(QPrinter* printer) { QPaintDevice* paintDevice=dynamic_cast(printer); printpreviewPaintRequestedNew(paintDevice); } -void JKQtBasePlotter::printpreviewPaintRequestedNew(QPaintDevice *paintDevice) +void JKQTBasePlotter::printpreviewPaintRequestedNew(QPaintDevice *paintDevice) { //QPaintDevice* paintDevice=dynamic_cast(printer); QPrinter* printer=dynamic_cast(paintDevice); @@ -2138,7 +2138,7 @@ void JKQtBasePlotter::printpreviewPaintRequestedNew(QPaintDevice *paintDevice) backgroundColor=bc; } -void JKQtBasePlotter::exportpreviewPaintRequested(JKQTPEnhancedPainter &painter, QSize size) { +void JKQTBasePlotter::exportpreviewPaintRequested(JKQTPEnhancedPainter &painter, QSize size) { double lw=lineWidthMultiplier; double fs=fontSizeMultiplier; QColor bc=backgroundColor; @@ -2165,13 +2165,13 @@ void JKQtBasePlotter::exportpreviewPaintRequested(JKQTPEnhancedPainter &painter, backgroundColor=bc; } -void JKQtBasePlotter::printpreviewSetZoom(double value) { +void JKQTBasePlotter::printpreviewSetZoom(double value) { printZoomFactor=value/100.0; if (printPreview) printPreview->updatePreview(); if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewSetSizeX(double value) { +void JKQTBasePlotter::printpreviewSetSizeX(double value) { printSizeX_Millimeter=value; if (printKeepAspect) { printSizeY_Millimeter=printSizeX_Millimeter*printAspect; @@ -2182,7 +2182,7 @@ void JKQtBasePlotter::printpreviewSetSizeX(double value) { if (exportPreviewLabel) updatePreviewLabel(); } } -void JKQtBasePlotter::printpreviewSetSizeY(double value) { +void JKQTBasePlotter::printpreviewSetSizeY(double value) { if (printKeepAspect) return; printSizeY_Millimeter=value; if (printDoUpdate) { @@ -2191,7 +2191,7 @@ void JKQtBasePlotter::printpreviewSetSizeY(double value) { } } -void JKQtBasePlotter::printpreviewSetSizeXNew(double value) { +void JKQTBasePlotter::printpreviewSetSizeXNew(double value) { printSizeX_Millimeter=value; if (printKeepAspect) { printSizeY_Millimeter=printSizeX_Millimeter*printAspect; @@ -2199,19 +2199,19 @@ void JKQtBasePlotter::printpreviewSetSizeXNew(double value) { } } -void JKQtBasePlotter::printpreviewSetSizeYNew(double value) { +void JKQTBasePlotter::printpreviewSetSizeYNew(double value) { printSizeY_Millimeter=value; } -void JKQtBasePlotter::printpreviewSetMagnification(double value) { +void JKQTBasePlotter::printpreviewSetMagnification(double value) { printMagnification=value/100.0; if (printPreview) printPreview->updatePreview(); if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewSetMagnificationNew(double value) +void JKQTBasePlotter::printpreviewSetMagnificationNew(double value) { printMagnification=value/100.0; @@ -2226,7 +2226,7 @@ void JKQtBasePlotter::printpreviewSetMagnificationNew(double value) } -void JKQtBasePlotter::printpreviewSetAspectRatio(bool checked) { +void JKQTBasePlotter::printpreviewSetAspectRatio(bool checked) { printKeepAspect=checked; if (printKeepAspect) { printSizeY_Millimeter=printSizeX_Millimeter*printAspect; @@ -2236,14 +2236,14 @@ void JKQtBasePlotter::printpreviewSetAspectRatio(bool checked) { if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewSetKeepAbsFontsize(bool checked) +void JKQTBasePlotter::printpreviewSetKeepAbsFontsize(bool checked) { printKeepAbsoluteFontSizes=checked; if (printPreview) printPreview->updatePreview(); if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewToggleMagnification(bool checked) +void JKQTBasePlotter::printpreviewToggleMagnification(bool checked) { if (checked) { if (spinMagnification) printpreviewSetMagnificationNew(spinMagnification->value()); @@ -2251,19 +2251,19 @@ void JKQtBasePlotter::printpreviewToggleMagnification(bool checked) printpreviewUpdate(); } -void JKQtBasePlotter::printpreviewSetLineWidthMultiplier(double value) { +void JKQTBasePlotter::printpreviewSetLineWidthMultiplier(double value) { lineWidthPrintMultiplier=value/100.0; if (printPreview) printPreview->updatePreview(); if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewSetFontSizeMultiplier(double value) { +void JKQTBasePlotter::printpreviewSetFontSizeMultiplier(double value) { fontSizePrintMultiplier=value/100.0; if (printPreview) printPreview->updatePreview(); if (exportPreviewLabel) updatePreviewLabel(); } -void JKQtBasePlotter::printpreviewUpdate() +void JKQTBasePlotter::printpreviewUpdate() { if (printDoUpdate) { if (printPreview) printPreview->updatePreview(); @@ -2271,9 +2271,9 @@ void JKQtBasePlotter::printpreviewUpdate() } } -void JKQtBasePlotter::draw(JKQTPEnhancedPainter& painter, QRect rect, bool drawOverlays) { +void JKQTBasePlotter::draw(JKQTPEnhancedPainter& painter, QRect rect, bool drawOverlays) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::draw(rect, %1)").arg(drawOverlays)); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::draw(rect, %1)").arg(drawOverlays)); #endif bool oldEmitPlotSignals=emitPlotSignals; emitPlotSignals=false; @@ -2299,7 +2299,7 @@ void JKQtBasePlotter::draw(JKQTPEnhancedPainter& painter, QRect rect, bool drawO emitPlotSignals=oldEmitPlotSignals; } -void JKQtBasePlotter::drawOverlays(JKQTPEnhancedPainter &painter, QRect rect) +void JKQTBasePlotter::drawOverlays(JKQTPEnhancedPainter &painter, QRect rect) { //resize(rect.width(), rect.height()); @@ -2311,9 +2311,9 @@ void JKQtBasePlotter::drawOverlays(JKQTPEnhancedPainter &painter, QRect rect) painter.restore(); } -void JKQtBasePlotter::draw(JKQTPEnhancedPainter& painter, QPoint pos, bool drawOverlays) { +void JKQTBasePlotter::draw(JKQTPEnhancedPainter& painter, QPoint pos, bool drawOverlays) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::draw(pos, %1)").arg(drawOverlays)); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::draw(pos, %1)").arg(drawOverlays)); #endif bool oldEmitPlotSignals=emitPlotSignals; emitPlotSignals=false; @@ -2339,9 +2339,9 @@ void JKQtBasePlotter::draw(JKQTPEnhancedPainter& painter, QPoint pos, bool drawO emitPlotSignals=oldEmitPlotSignals; } -void JKQtBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QRect rect, bool drawOverlays) { +void JKQTBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QRect rect, bool drawOverlays) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::drawNonGrid(rect, %1)").arg(drawOverlays)); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::drawNonGrid(rect, %1)").arg(drawOverlays)); #endif bool oldEmitPlotSignals=emitPlotSignals; emitPlotSignals=false; @@ -2385,9 +2385,9 @@ void JKQtBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QRect rect, boo } -void JKQtBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QPoint pos, bool drawOverlays) { +void JKQTBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QPoint pos, bool drawOverlays) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::drawNonGrid(pos, %1)").arg(drawOverlays)); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::drawNonGrid(pos, %1)").arg(drawOverlays)); #endif bool oldEmitPlotSignals=emitPlotSignals; emitPlotSignals=false; @@ -2431,9 +2431,9 @@ void JKQtBasePlotter::drawNonGrid(JKQTPEnhancedPainter& painter, QPoint pos, boo emitPlotSignals=oldEmitPlotSignals; } -void JKQtBasePlotter::drawNonGridOverlays(JKQTPEnhancedPainter& painter, QPoint pos) { +void JKQTBasePlotter::drawNonGridOverlays(JKQTPEnhancedPainter& painter, QPoint pos) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::drawNonGridOverlays(point)")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::drawNonGridOverlays(point)")); #endif QRect rect=QRect(pos, QSize(widgetWidth/paintMagnification, widgetHeight/paintMagnification)); painter.save(); @@ -2450,7 +2450,7 @@ void JKQtBasePlotter::drawNonGridOverlays(JKQTPEnhancedPainter& painter, QPoint painter.restore(); } -void JKQtBasePlotter::registerAdditionalAction(const QString &key, QAction *act) +void JKQTBasePlotter::registerAdditionalAction(const QString &key, QAction *act) { if (!lstAdditionalPlotterActions.contains(key)) { QList > l; @@ -2469,7 +2469,7 @@ void JKQtBasePlotter::registerAdditionalAction(const QString &key, QAction *act) } } -void JKQtBasePlotter::deregisterAdditionalAction(QAction *act) +void JKQTBasePlotter::deregisterAdditionalAction(QAction *act) { AdditionalActionsMapIterator it(lstAdditionalPlotterActions); while (it.hasNext()) { @@ -2482,7 +2482,7 @@ void JKQtBasePlotter::deregisterAdditionalAction(QAction *act) } } -void JKQtBasePlotter::copyData() { +void JKQTBasePlotter::copyData() { loadUserSettings(); QString result=""; QString qfresult; @@ -2511,7 +2511,7 @@ void JKQtBasePlotter::copyData() { } -void JKQtBasePlotter::copyDataMatlab() { +void JKQTBasePlotter::copyDataMatlab() { loadUserSettings(); QString result=""; { @@ -2524,7 +2524,7 @@ void JKQtBasePlotter::copyDataMatlab() { saveUserSettings(); } -void JKQtBasePlotter::saveData(QString filename, QString format) { +void JKQTBasePlotter::saveData(QString filename, QString format) { loadUserSettings(); QStringList fileformats; QStringList fileformatIDs; @@ -2618,7 +2618,7 @@ void JKQtBasePlotter::saveData(QString filename, QString format) { } } -void JKQtBasePlotter::saveAsCSV(QString filename) { +void JKQTBasePlotter::saveAsCSV(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2634,7 +2634,7 @@ void JKQtBasePlotter::saveAsCSV(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsSYLK(QString filename) { +void JKQTBasePlotter::saveAsSYLK(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2650,7 +2650,7 @@ void JKQtBasePlotter::saveAsSYLK(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsMatlab(QString filename) { +void JKQTBasePlotter::saveAsMatlab(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2666,7 +2666,7 @@ void JKQtBasePlotter::saveAsMatlab(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsDIF(QString filename) { +void JKQTBasePlotter::saveAsDIF(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2682,7 +2682,7 @@ void JKQtBasePlotter::saveAsDIF(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsSemicolonSV(QString filename) { +void JKQTBasePlotter::saveAsSemicolonSV(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2698,7 +2698,7 @@ void JKQtBasePlotter::saveAsSemicolonSV(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsTabSV(QString filename) { +void JKQTBasePlotter::saveAsTabSV(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2714,7 +2714,7 @@ void JKQtBasePlotter::saveAsTabSV(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsGerExcelCSV(QString filename) { +void JKQTBasePlotter::saveAsGerExcelCSV(QString filename) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2730,7 +2730,7 @@ void JKQtBasePlotter::saveAsGerExcelCSV(QString filename) { saveUserSettings(); } -void JKQtBasePlotter::saveAsPDF(QString filename, bool displayPreview) { +void JKQTBasePlotter::saveAsPDF(QString filename, bool displayPreview) { loadUserSettings(); QString fn=filename; if (fn.isEmpty()) { @@ -2763,7 +2763,7 @@ void JKQtBasePlotter::saveAsPDF(QString filename, bool displayPreview) { saveUserSettings(); } -void JKQtBasePlotter::saveAsPS(QString filename, bool displayPreview) { +void JKQTBasePlotter::saveAsPS(QString filename, bool displayPreview) { #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) loadUserSettings(); QString fn=filename; @@ -2800,7 +2800,7 @@ void JKQtBasePlotter::saveAsPS(QString filename, bool displayPreview) { } -void JKQtBasePlotter::saveImage(QString filename, bool displayPreview) { +void JKQTBasePlotter::saveImage(QString filename, bool displayPreview) { loadUserSettings(); QString fn=filename; QStringList filt; @@ -2905,7 +2905,7 @@ void JKQtBasePlotter::saveImage(QString filename, bool displayPreview) { } -void JKQtBasePlotter::saveAsPixelImage(QString filename, bool displayPreview, const QByteArray& outputFormat) { +void JKQTBasePlotter::saveAsPixelImage(QString filename, bool displayPreview, const QByteArray& outputFormat) { loadUserSettings(); QString fn=filename; QStringList filt; @@ -2988,7 +2988,7 @@ void JKQtBasePlotter::saveAsPixelImage(QString filename, bool displayPreview, co } -void JKQtBasePlotter::copyPixelImage() { +void JKQTBasePlotter::copyPixelImage() { /*qDebug()<set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); - } else if (graphStyle==JKQTPimpulsesVertical) { - JKQTPimpulsesVerticalGraph* gr=new JKQTPimpulsesVerticalGraph(this); + } else if (graphStyle==JKQTPImpulsesVertical) { + JKQTPImpulsesVerticalGraph* gr=new JKQTPImpulsesVerticalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveX) { - JKQTPfilledCurveXGraph* gr=new JKQTPfilledCurveXGraph(this); + } else if (graphStyle==JKQTPFilledCurveX) { + JKQTPFilledCurveXGraph* gr=new JKQTPFilledCurveXGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveY) { - JKQTPfilledCurveYGraph* gr=new JKQTPfilledCurveYGraph(this); + } else if (graphStyle==JKQTPFilledCurveY) { + JKQTPFilledCurveYGraph* gr=new JKQTPFilledCurveYGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); - } else if (graphStyle==JKQTPstepsX) { - JKQTPstepHorizontalGraph* gr=new JKQTPstepHorizontalGraph(this); + } else if (graphStyle==JKQTPStepsX) { + JKQTPStepHorizontalGraph* gr=new JKQTPStepHorizontalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); - } else if (graphStyle==JKQTPstepsY) { - JKQTPstepVerticalGraph* gr=new JKQTPstepVerticalGraph(this); + } else if (graphStyle==JKQTPStepsY) { + JKQTPStepVerticalGraph* gr=new JKQTPStepVerticalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); return addGraph(gr); } else { - JKQTPxyLineGraph* gr=new JKQTPxyLineGraph(this); + JKQTPXYLineGraph* gr=new JKQTPXYLineGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); - if (graphStyle==JKQTPpoints) { gr->set_symbol(JKQTPplus); gr->set_drawLine(false); } - else if (graphStyle==JKQTPlinesPoints) gr->set_symbol(JKQTPplus); + if (graphStyle==JKQTPPoints) { gr->set_symbol(JKQTPPlus); gr->set_drawLine(false); } + else if (graphStyle==JKQTPLinesPoints) gr->set_symbol(JKQTPPlus); return addGraph(gr); } return -1; } -size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPgraphPlotstyle graphStyle, QColor color, JKQTPgraphSymbols symbol, Qt::PenStyle penstyle, double width) { - if (graphStyle==JKQTPimpulsesHorizontal) { - JKQTPimpulsesHorizontalGraph* gr=new JKQTPimpulsesHorizontalGraph(this); +size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPGraphPlotstyle graphStyle, QColor color, JKQTPGraphSymbols symbol, Qt::PenStyle penstyle, double width) { + if (graphStyle==JKQTPImpulsesHorizontal) { + JKQTPImpulsesHorizontalGraph* gr=new JKQTPImpulsesHorizontalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(color); gr->set_lineWidth(width); return addGraph(gr); - } else if (graphStyle==JKQTPimpulsesVertical) { - JKQTPimpulsesVerticalGraph* gr=new JKQTPimpulsesVerticalGraph(this); + } else if (graphStyle==JKQTPImpulsesVertical) { + JKQTPImpulsesVerticalGraph* gr=new JKQTPImpulsesVerticalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(color); gr->set_lineWidth(width); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveX) { - JKQTPfilledCurveXGraph* gr=new JKQTPfilledCurveXGraph(this); + } else if (graphStyle==JKQTPFilledCurveX) { + JKQTPFilledCurveXGraph* gr=new JKQTPFilledCurveXGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3294,8 +3294,8 @@ size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveY) { - JKQTPfilledCurveYGraph* gr=new JKQTPfilledCurveYGraph(this); + } else if (graphStyle==JKQTPFilledCurveY) { + JKQTPFilledCurveYGraph* gr=new JKQTPFilledCurveYGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3304,8 +3304,8 @@ size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); - } else if (graphStyle==JKQTPstepsX) { - JKQTPstepHorizontalGraph* gr=new JKQTPstepHorizontalGraph(this); + } else if (graphStyle==JKQTPStepsX) { + JKQTPStepHorizontalGraph* gr=new JKQTPStepHorizontalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3314,8 +3314,8 @@ size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); - } else if (graphStyle==JKQTPstepsY) { - JKQTPstepVerticalGraph* gr=new JKQTPstepVerticalGraph(this); + } else if (graphStyle==JKQTPStepsY) { + JKQTPStepVerticalGraph* gr=new JKQTPStepVerticalGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3325,7 +3325,7 @@ size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_fillColor(color); return addGraph(gr); } else { - JKQTPxyLineGraph* gr=new JKQTPxyLineGraph(this); + JKQTPXYLineGraph* gr=new JKQTPXYLineGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3333,15 +3333,15 @@ size_t JKQtBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_style(penstyle); gr->set_color(color); gr->set_symbol(symbol); - if (graphStyle==JKQTPpoints) { gr->set_symbol(JKQTPplus); gr->set_drawLine(false); } - else if (graphStyle==JKQTPlinesPoints) gr->set_symbol(JKQTPplus); + if (graphStyle==JKQTPPoints) { gr->set_symbol(JKQTPPlus); gr->set_drawLine(false); } + else if (graphStyle==JKQTPLinesPoints) gr->set_symbol(JKQTPPlus); return addGraph(gr); } return -1; } -size_t JKQtBasePlotter::addHorizontalBoxplot(QString title, int posColumn, int medianColumn, int minColumn, int maxColumn, int percentile25Column, int percentile75Column, int meanColumn) { - JKQTPboxplotHorizontalGraph* box=new JKQTPboxplotHorizontalGraph(this); +size_t JKQTBasePlotter::addHorizontalBoxplot(QString title, int posColumn, int medianColumn, int minColumn, int maxColumn, int percentile25Column, int percentile75Column, int meanColumn) { + JKQTPBoxplotHorizontalGraph* box=new JKQTPBoxplotHorizontalGraph(this); box->set_posColumn(posColumn); box->set_medianColumn(medianColumn); box->set_meanColumn(meanColumn); @@ -3353,8 +3353,8 @@ size_t JKQtBasePlotter::addHorizontalBoxplot(QString title, int posColumn, int m return addGraph(box); } -size_t JKQtBasePlotter::addVerticalBoxplot(QString title, int posColumn, int medianColumn, int minColumn, int maxColumn, int percentile25Column, int percentile75Column, int meanColumn) { - JKQTPboxplotVerticalGraph* box=new JKQTPboxplotVerticalGraph(this); +size_t JKQTBasePlotter::addVerticalBoxplot(QString title, int posColumn, int medianColumn, int minColumn, int maxColumn, int percentile25Column, int percentile75Column, int meanColumn) { + JKQTPBoxplotVerticalGraph* box=new JKQTPBoxplotVerticalGraph(this); box->set_posColumn(posColumn); box->set_medianColumn(medianColumn); box->set_meanColumn(meanColumn); @@ -3366,12 +3366,12 @@ size_t JKQtBasePlotter::addVerticalBoxplot(QString title, int posColumn, int med return addGraph(box); } -void JKQtBasePlotter::addHorizontalBargraph(size_t xColumn, QVector yColumns, QStringList titles) { +void JKQTBasePlotter::addHorizontalBargraph(size_t xColumn, QVector yColumns, QStringList titles) { double w=0.9; double width=w/(double)yColumns.size(); double s=-1.0*w/2.0+width/2.0; for (int i=0; iset_title(titles[i]); g->set_xColumn(xColumn); g->set_yColumn(yColumns[i]); @@ -3383,12 +3383,12 @@ void JKQtBasePlotter::addHorizontalBargraph(size_t xColumn, QVector yCol } } -void JKQtBasePlotter::addVerticalBargraph(QVector xColumns, size_t yColumn, QStringList titles) { +void JKQTBasePlotter::addVerticalBargraph(QVector xColumns, size_t yColumn, QStringList titles) { double w=0.9; double width=w/(double)xColumns.size(); double s=-1.0*w/2.0+width/2.0; for (int i=0; iset_title(titles[i]); g->set_xColumn(xColumns[i]); g->set_yColumn(yColumn); @@ -3400,9 +3400,9 @@ void JKQtBasePlotter::addVerticalBargraph(QVector xColumns, size_t yColu } } -size_t JKQtBasePlotter::addGraphWithXError(size_t xColumn, size_t yColumn, size_t xErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle, JKQTPerrorPlotstyle errorStyle){ - if (graphStyle==JKQTPimpulsesHorizontal) { - JKQTPimpulsesHorizontalErrorGraph* gr=new JKQTPimpulsesHorizontalErrorGraph(this); +size_t JKQTBasePlotter::addGraphWithXError(size_t xColumn, size_t yColumn, size_t xErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle, JKQTPErrorPlotstyle errorStyle){ + if (graphStyle==JKQTPImpulsesHorizontal) { + JKQTPImpulsesHorizontalErrorGraph* gr=new JKQTPImpulsesHorizontalErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3413,8 +3413,8 @@ size_t JKQtBasePlotter::addGraphWithXError(size_t xColumn, size_t yColumn, size_ fc.setAlphaF(0.5); gr->set_errorFillColor(fc); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveY) { - JKQTPfilledCurveYErrorGraph* gr=new JKQTPfilledCurveYErrorGraph(this); + } else if (graphStyle==JKQTPFilledCurveY) { + JKQTPFilledCurveYErrorGraph* gr=new JKQTPFilledCurveYErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3426,27 +3426,27 @@ size_t JKQtBasePlotter::addGraphWithXError(size_t xColumn, size_t yColumn, size_ gr->set_errorFillColor(fc); return addGraph(gr); } else { - JKQTPxyLineErrorGraph* gr=new JKQTPxyLineErrorGraph(this); + JKQTPXYLineErrorGraph* gr=new JKQTPXYLineErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_yErrorColumn(xErrorColumn); gr->set_yErrorStyle(errorStyle); - gr->set_xErrorStyle(JKQTPnoError); + gr->set_xErrorStyle(JKQTPNoError); gr->set_errorColor(gr->get_color()); QColor fc=gr->get_color(); fc.setAlphaF(0.5); gr->set_errorFillColor(fc); - if (graphStyle==JKQTPpoints) { gr->set_symbol(JKQTPplus); gr->set_drawLine(false); } - else if (graphStyle==JKQTPlinesPoints) gr->set_symbol(JKQTPplus); + if (graphStyle==JKQTPPoints) { gr->set_symbol(JKQTPPlus); gr->set_drawLine(false); } + else if (graphStyle==JKQTPLinesPoints) gr->set_symbol(JKQTPPlus); return addGraph(gr); } } -size_t JKQtBasePlotter::addGraphWithYError(size_t xColumn, size_t yColumn, size_t yErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle, JKQTPerrorPlotstyle errorStyle){ - if (graphStyle==JKQTPimpulsesVertical) { - JKQTPimpulsesVerticalErrorGraph* gr=new JKQTPimpulsesVerticalErrorGraph(this); +size_t JKQTBasePlotter::addGraphWithYError(size_t xColumn, size_t yColumn, size_t yErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle, JKQTPErrorPlotstyle errorStyle){ + if (graphStyle==JKQTPImpulsesVertical) { + JKQTPImpulsesVerticalErrorGraph* gr=new JKQTPImpulsesVerticalErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3458,8 +3458,8 @@ size_t JKQtBasePlotter::addGraphWithYError(size_t xColumn, size_t yColumn, size_ fc.setAlphaF(0.5); gr->set_errorFillColor(fc); return addGraph(gr); - } else if (graphStyle==JKQTPfilledCurveX) { - JKQTPfilledCurveXErrorGraph* gr=new JKQTPfilledCurveXErrorGraph(this); + } else if (graphStyle==JKQTPFilledCurveX) { + JKQTPFilledCurveXErrorGraph* gr=new JKQTPFilledCurveXErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); @@ -3471,50 +3471,50 @@ size_t JKQtBasePlotter::addGraphWithYError(size_t xColumn, size_t yColumn, size_ gr->set_errorFillColor(fc); return addGraph(gr); } else { - JKQTPxyLineErrorGraph* gr=new JKQTPxyLineErrorGraph(this); + JKQTPXYLineErrorGraph* gr=new JKQTPXYLineErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_yErrorColumn(yErrorColumn); gr->set_yErrorStyle(errorStyle); - gr->set_xErrorStyle(JKQTPnoError); + gr->set_xErrorStyle(JKQTPNoError); gr->set_errorColor(gr->get_color()); QColor fc=gr->get_color(); fc.setAlphaF(0.5); gr->set_errorFillColor(fc); - if (graphStyle==JKQTPpoints) { gr->set_symbol(JKQTPplus); gr->set_drawLine(false); } - else if (graphStyle==JKQTPlinesPoints) gr->set_symbol(JKQTPplus); + if (graphStyle==JKQTPPoints) { gr->set_symbol(JKQTPPlus); gr->set_drawLine(false); } + else if (graphStyle==JKQTPLinesPoints) gr->set_symbol(JKQTPPlus); return addGraph(gr); } } -size_t JKQtBasePlotter::addGraphWithXYError(size_t xColumn, size_t yColumn, size_t xErrorColumn, size_t yErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle){ - JKQTPxyLineErrorGraph* gr=new JKQTPxyLineErrorGraph(this); +size_t JKQTBasePlotter::addGraphWithXYError(size_t xColumn, size_t yColumn, size_t xErrorColumn, size_t yErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle){ + JKQTPXYLineErrorGraph* gr=new JKQTPXYLineErrorGraph(this); gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_yErrorColumn(yErrorColumn); - gr->set_yErrorStyle(JKQTPerrorBars); + gr->set_yErrorStyle(JKQTPErrorBars); gr->set_xErrorColumn(xErrorColumn); - gr->set_xErrorStyle(JKQTPerrorBars); + gr->set_xErrorStyle(JKQTPErrorBars); gr->set_errorColor(gr->get_color()); QColor fc=gr->get_color(); fc.setAlphaF(0.5); gr->set_errorFillColor(fc); - if (graphStyle==JKQTPpoints) { gr->set_symbol(JKQTPplus); gr->set_drawLine(false); } - else if (graphStyle==JKQTPlinesPoints) gr->set_symbol(JKQTPplus); + if (graphStyle==JKQTPPoints) { gr->set_symbol(JKQTPPlus); gr->set_drawLine(false); } + else if (graphStyle==JKQTPLinesPoints) gr->set_symbol(JKQTPPlus); return addGraph(gr); } -void JKQtBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ +void JKQTBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::plotGraphs")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::plotGraphs")); #endif if (datastore==nullptr || graphs.isEmpty()) return; - //qDebug()<<"start JKQtPlotterBase::plotGraphs()"; + //qDebug()<<"start JKQTPLotterBase::plotGraphs()"; if (useClipping) { QRegion cregion(iplotBorderLeft, iplotBorderTop, plotWidth, plotHeight); painter.setClipping(true); @@ -3529,8 +3529,8 @@ void JKQtBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ for (int j=0; jget_title()<metaObject()->className(); + JKQTPPlotElement* g=graphs[j]; + //qDebug()<<" drawing JKQTPPlotElement"<get_title()<metaObject()->className(); if (g->get_visible()) g->draw(painter); } @@ -3540,7 +3540,7 @@ void JKQtBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ for (int j=0; jget_visible()) { g->getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); ibTop+=topSpace; @@ -3555,13 +3555,13 @@ void JKQtBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ } } - //qDebug()<<" end JKQtPlotterBase::plotGraphs()"; + //qDebug()<<" end JKQTPLotterBase::plotGraphs()"; } -void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, double y, double /*width*/, double /*height*/){ +void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, double y, double /*width*/, double /*height*/){ #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtBasePlotter::plotKeyContents(%1, %2, %3, %4)").arg(x).arg(y).arg(width).arg(height)); + JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::plotKeyContents(%1, %2, %3, %4)").arg(x).arg(y).arg(width).arg(height)); #endif painter.save(); @@ -3579,10 +3579,10 @@ void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d QFont kf(keyFont, keyFontSize*fontSizeMultiplier); QFontMetricsF kfm(kf); - if (keyLayout==JKQTPkeyLayoutOneColumn) { + if (keyLayout==JKQTPKeyLayoutOneColumn) { for (int i=0; iget_title())); #endif @@ -3602,10 +3602,10 @@ void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d y=y+key_text_height+(keyYSeparation)*kfm.width('X'); } } - } else if (keyLayout==JKQTPkeyLayoutOneRow) { + } else if (keyLayout==JKQTPKeyLayoutOneRow) { for (int i=0; iget_title())); #endif @@ -3625,12 +3625,12 @@ void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d x=x+fs.width()+(2.0*keyXSeparation+key_line_length)*kfm.width('X'); } } - } else if (keyLayout==JKQTPkeyLayoutMultiColumn) { + } else if (keyLayout==JKQTPKeyLayoutMultiColumn) { //int columns=floor(static_cast(plotWidth)/(double)(key_item_width*kfm.width('X'))); bool colfirst=true; - if (keyPosition==JKQTPkeyInsideTopLeft || keyPosition==JKQTPkeyInsideTopRight - || keyPosition==JKQTPkeyOutsideTopLeft || keyPosition==JKQTPkeyOutsideTopRight) { + if (keyPosition==JKQTPKeyInsideTopLeft || keyPosition==JKQTPKeyInsideTopRight + || keyPosition==JKQTPKeyOutsideTopLeft || keyPosition==JKQTPKeyOutsideTopRight) { colfirst=false; } @@ -3639,7 +3639,7 @@ void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d double xx=x; double yy=y; for (int i=0; iget_title())); #endif @@ -3689,16 +3689,16 @@ void JKQtBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d painter.restore(); } -void JKQtBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, double* height, double* text_width, double* text_height, int* columns_count, int *lines_count) { +void JKQTBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, double* height, double* text_width, double* text_height, int* columns_count, int *lines_count) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQtBasePlotter::getKeyExtent"); + JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::getKeyExtent"); #endif QFont f=painter.font(); f.setFamily(keyFont); f.setPointSizeF(keyFontSize*fontSizeMultiplier); QFontMetricsF kfm(f); if (text_height!=nullptr) *text_height=key_item_height*kfm.width('X'); - if (keyLayout==JKQTPkeyLayoutOneColumn) { + if (keyLayout==JKQTPKeyLayoutOneColumn) { int keyHeight=graphs.size(); double w=0; double h=0; @@ -3729,7 +3729,7 @@ void JKQtBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, if (height) *height=h;//keyHeight*key_item_height*kfm.width('X'); if (columns_count) *columns_count=1; if (lines_count) *lines_count=keyHeight; - } else if (keyLayout==JKQTPkeyLayoutOneRow) { + } else if (keyLayout==JKQTPKeyLayoutOneRow) { int keyWidth=graphs.size(); double w=0; double h=0; @@ -3761,7 +3761,7 @@ void JKQtBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, if (width) *width=w;//keyHeight*key_item_height*kfm.width('X'); if (columns_count) *columns_count=keyWidth; if (lines_count) *lines_count=1; - } else if (keyLayout==JKQTPkeyLayoutMultiColumn) { + } else if (keyLayout==JKQTPKeyLayoutMultiColumn) { // copied code in plotKeyContents()!!! double keyHeight=graphs.size(); @@ -3797,8 +3797,8 @@ void JKQtBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, int lines=(int)ceil((double)keyHeight/(double)columns); lines=qMin((double)lines, keyHeight); - if (keyPosition==JKQTPkeyInsideTopLeft || keyPosition==JKQTPkeyInsideTopRight - || keyPosition==JKQTPkeyOutsideTopLeft || keyPosition==JKQTPkeyOutsideTopRight) { + if (keyPosition==JKQTPKeyInsideTopLeft || keyPosition==JKQTPKeyInsideTopRight + || keyPosition==JKQTPKeyOutsideTopLeft || keyPosition==JKQTPKeyOutsideTopRight) { if (keyAutosize) { lines=(int)floor(static_cast(plotHeight)/(double)(txtH+(keyYSeparation)*kfm.width('X'))); } else { @@ -3830,7 +3830,7 @@ void JKQtBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width, } } -void JKQtBasePlotter::loadUserSettings() +void JKQTBasePlotter::loadUserSettings() { if (!userSettigsFilename.isEmpty()) { QSettings set(userSettigsFilename, QSettings::IniFormat); @@ -3839,7 +3839,7 @@ void JKQtBasePlotter::loadUserSettings() } } -void JKQtBasePlotter::saveUserSettings() +void JKQTBasePlotter::saveUserSettings() { if (!userSettigsFilename.isEmpty()) { QSettings set(userSettigsFilename, QSettings::IniFormat); @@ -3850,7 +3850,7 @@ void JKQtBasePlotter::saveUserSettings() -void JKQtBasePlotter::getGraphsXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +void JKQTBasePlotter::getGraphsXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { bool start=true; minx=0; maxx=0; @@ -3877,7 +3877,7 @@ void JKQtBasePlotter::getGraphsXMinMax(double& minx, double& maxx, double& small } } -void JKQtBasePlotter::getGraphsYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +void JKQTBasePlotter::getGraphsYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { bool start=true; miny=0; maxy=0; @@ -3903,8 +3903,8 @@ void JKQtBasePlotter::getGraphsYMinMax(double& miny, double& maxy, double& small } -void JKQtBasePlotter::zoomToFit(bool zoomX, bool zoomY, bool includeX0, bool includeY0, double scaleX, double scaleY) { - //std::cout<<"JKQtPlotterBase::zoomToFit():\n"; +void JKQTBasePlotter::zoomToFit(bool zoomX, bool zoomY, bool includeX0, bool includeY0, double scaleX, double scaleY) { + //std::cout<<"JKQTPLotterBase::zoomToFit():\n"; double xxmin; double xxmax; double xsmallestGreaterZero; @@ -4006,23 +4006,23 @@ void JKQtBasePlotter::zoomToFit(bool zoomX, bool zoomY, bool includeX0, bool inc -JKQTPoverlayElement *JKQtBasePlotter::getOverlayElement(size_t i) { +JKQTPOverlayElement *JKQTBasePlotter::getOverlayElement(size_t i) { return overlays[i]; } -size_t JKQtBasePlotter::getOverlayElementCount() { +size_t JKQTBasePlotter::getOverlayElementCount() { return overlays.size(); } -void JKQtBasePlotter::deleteOverlayElement(size_t i, bool deletegraph) { +void JKQTBasePlotter::deleteOverlayElement(size_t i, bool deletegraph) { if (long(i)<0 || long(i)>=overlays.size()) return; - JKQTPoverlayElement* g=overlays[i]; + JKQTPOverlayElement* g=overlays[i]; overlays.removeAt(i); if (deletegraph && g) delete g; if (emitPlotSignals) emit overlaysUpdated(); } -void JKQtBasePlotter::deleteOverlayElement(JKQTPoverlayElement *gr, bool deletegraph) { +void JKQTBasePlotter::deleteOverlayElement(JKQTPOverlayElement *gr, bool deletegraph) { int i=overlays.indexOf(gr); while (i>=0) { overlays.removeAt(i); @@ -4033,16 +4033,16 @@ void JKQtBasePlotter::deleteOverlayElement(JKQTPoverlayElement *gr, bool deleteg if (emitPlotSignals) emit overlaysUpdated(); } -void JKQtBasePlotter::clearOverlayElement(bool deleteGraphs) { +void JKQTBasePlotter::clearOverlayElement(bool deleteGraphs) { for (int i=0; isetParent(this); for (int i=0; isetParent(this); for (int i=0; i &gr) { +void JKQTBasePlotter::addOverlayElements(const QList &gr) { for (int i=0; i< gr.size(); i++) { addOverlayElement(gr[i]); } } -QVector JKQtBasePlotter::getBoundingLinesX1Y1(QRectF* rect) const +QVector JKQTBasePlotter::getBoundingLinesX1Y1(QRectF* rect) const { QVector l; const QPointF pmimi=QPointF(x2p(xAxis->getMin()), y2p(yAxis->getMin())); @@ -4102,23 +4102,23 @@ QVector JKQtBasePlotter::getBoundingLinesX1Y1(QRectF* rect) const -JKQTPplotElement* JKQtBasePlotter::getGraph(size_t i) { +JKQTPPlotElement* JKQTBasePlotter::getGraph(size_t i) { return graphs[i]; }; -size_t JKQtBasePlotter::getGraphCount() { +size_t JKQTBasePlotter::getGraphCount() { return graphs.size(); }; -void JKQtBasePlotter::deleteGraph(size_t i, bool deletegraph) { +void JKQTBasePlotter::deleteGraph(size_t i, bool deletegraph) { if (long(i)<0 || long(i)>=graphs.size()) return; - JKQTPplotElement* g=graphs[i]; + JKQTPPlotElement* g=graphs[i]; graphs.removeAt(i); if (deletegraph && g) delete g; if (emitPlotSignals) emit plotUpdated(); }; -void JKQtBasePlotter::deleteGraph(JKQTPplotElement* gr, bool deletegraph) { +void JKQTBasePlotter::deleteGraph(JKQTPPlotElement* gr, bool deletegraph) { int i=graphs.indexOf(gr); while (i>=0) { graphs.removeAt(i); @@ -4129,9 +4129,9 @@ void JKQtBasePlotter::deleteGraph(JKQTPplotElement* gr, bool deletegraph) { if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::clearGraphs(bool deleteGraphs) { +void JKQTBasePlotter::clearGraphs(bool deleteGraphs) { for (int i=0; iset_visible(false); } if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::setAllGraphsVisible() +void JKQTBasePlotter::setAllGraphsVisible() { for (int i=0; iset_visible(true); } if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::setGraphVisible(int i, bool visible) +void JKQTBasePlotter::setGraphVisible(int i, bool visible) { - JKQTPplotElement* g=graphs.value(i, nullptr); + JKQTPPlotElement* g=graphs.value(i, nullptr); if (g) g->set_visible(visible); if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::setOnlyGraphVisible(int gr) +void JKQTBasePlotter::setOnlyGraphVisible(int gr) { for (int i=0; iset_visible(false); } - JKQTPplotElement* g=graphs.value(gr, nullptr); + JKQTPPlotElement* g=graphs.value(gr, nullptr); if (g) g->set_visible(true); if (emitPlotSignals) emit plotUpdated(); } -void JKQtBasePlotter::setOnlyNthGraphsVisible(int start, int n) +void JKQTBasePlotter::setOnlyNthGraphsVisible(int start, int n) { for (int i=0; iset_visible(false); } for (int i=start; iset_visible(true); } if (emitPlotSignals) emit plotUpdated(); } -size_t JKQtBasePlotter::addGraph(JKQTPplotElement* gr) { +size_t JKQTBasePlotter::addGraph(JKQTPPlotElement* gr) { gr->setParent(this); for (int i=0; isetParent(this); for (int i=0; isetParent(this); for (int i=0; i(graphs[i]); + JKQTPGraph* g=dynamic_cast(graphs[i]); if (g) { g->set_datarange_start(datarange_start); g->set_datarange_end(datarange_end); @@ -4251,33 +4251,33 @@ void JKQtBasePlotter::setGraphsDataRange(int datarange_start, int datarange_end) } } -void JKQtBasePlotter::set_userSettigsFilename(const QString &filename, const QString &prefix) +void JKQTBasePlotter::set_userSettigsFilename(const QString &filename, const QString &prefix) { userSettigsFilename=filename; userSettigsPrefix=prefix; } -void JKQtBasePlotter::set_userSettigsFilename(const QString &filename) +void JKQTBasePlotter::set_userSettigsFilename(const QString &filename) { userSettigsFilename=filename; } -void JKQtBasePlotter::set_userSettigsPrefix(const QString &prefix) +void JKQTBasePlotter::set_userSettigsPrefix(const QString &prefix) { userSettigsPrefix=prefix; } -QString JKQtBasePlotter::get_userSettigsFilename() const +QString JKQTBasePlotter::get_userSettigsFilename() const { return userSettigsFilename; } -QString JKQtBasePlotter::get_userSettigsPrefix() const +QString JKQTBasePlotter::get_userSettigsPrefix() const { return userSettigsPrefix; } -QSet JKQtBasePlotter::getDataColumnsByUser() { +QSet JKQTBasePlotter::getDataColumnsByUser() { loadUserSettings(); QSet set; @@ -4348,21 +4348,21 @@ QSet JKQtBasePlotter::getDataColumnsByUser() { } -void JKQtBasePlotter::getDataColumnsByUserCheckAll() { +void JKQTBasePlotter::getDataColumnsByUserCheckAll() { if (!dataColumnsListWidget) return; for (int i=0; icount(); i++) { dataColumnsListWidget->item(i)->setCheckState(Qt::Checked); } } -void JKQtBasePlotter::getDataColumnsByUserCheckNone() { +void JKQTBasePlotter::getDataColumnsByUserCheckNone() { if (!dataColumnsListWidget) return; for (int i=0; icount(); i++) { dataColumnsListWidget->item(i)->setCheckState(Qt::Unchecked); } } -void JKQtBasePlotter::getDataColumnsByUserSave() { +void JKQTBasePlotter::getDataColumnsByUserSave() { if (!dataColumnsListWidget) return; QString name=tr("my selection name"); QStringList items=getDataColumnsByUserSaved.keys(); @@ -4384,7 +4384,7 @@ void JKQtBasePlotter::getDataColumnsByUserSave() { } } -void JKQtBasePlotter::getDataColumnsByUserComboBoxSelected(const QString &name) { +void JKQTBasePlotter::getDataColumnsByUserComboBoxSelected(const QString &name) { if (!dataColumnsListWidget) return; QStringList newItems=getDataColumnsByUserSaved.value(name, QStringList()); if (getDataColumnsByUserSaved.contains(name)) { @@ -4398,7 +4398,7 @@ void JKQtBasePlotter::getDataColumnsByUserComboBoxSelected(const QString &name) } } -void JKQtBasePlotter::getDataColumnsByUserItemChanged(QListWidgetItem * /*widgetitem*/) { +void JKQTBasePlotter::getDataColumnsByUserItemChanged(QListWidgetItem * /*widgetitem*/) { if (!dataColumnsListWidget) return; QStringList data; for (int i=0; icount(); i++) { @@ -4422,7 +4422,7 @@ void JKQtBasePlotter::getDataColumnsByUserItemChanged(QListWidgetItem * /*widget connect(dataColumnsCombobox, SIGNAL(currentIndexChanged(QString)), this, SLOT(getDataColumnsByUserComboBoxSelected(QString))); } -void JKQtBasePlotter::showPlotData() { +void JKQTBasePlotter::showPlotData() { QDialog* dlg=new QDialog(nullptr,Qt::Dialog|Qt::WindowCloseButtonHint|Qt::WindowMinMaxButtonsHint); dlg->setWindowTitle(tr("Plot data table")); dlg->setSizeGripEnabled(true); @@ -4430,7 +4430,7 @@ void JKQtBasePlotter::showPlotData() { QVBoxLayout* layout=new QVBoxLayout(); dlg->setLayout(layout); QToolBar* tb=new QToolBar("toolbar", dlg); - QAction* actClose=new QAction(QIcon(":/JKQTPlotter/jkqtp_exit.png"), tr("&Close Window"), dlg); + QAction* actClose=new QAction(QIcon(":/JKQTPLotter/jkqtp_exit.png"), tr("&Close Window"), dlg); connect(actClose, SIGNAL(triggered()), dlg, SLOT(accept())); tb->addAction(actClose); tb->addSeparator(); @@ -4443,7 +4443,7 @@ void JKQtBasePlotter::showPlotData() { layout->addWidget(tv); tb->addAction(tv->getPrintAction()); - JKQTPdatastoreModel* model=new JKQTPdatastoreModel(getDatastore(), this); + JKQTPDatastoreModel* model=new JKQTPDatastoreModel(getDatastore(), this); tv->setModel(model); tv->resizeColumnsToContents(); tv->resizeRowsToContents(); @@ -4453,7 +4453,7 @@ void JKQtBasePlotter::showPlotData() { } -void JKQtBasePlotter::set_emitSignals(bool enabled) +void JKQTBasePlotter::set_emitSignals(bool enabled) { emitSignals=enabled; xAxis->set_doUpdateScaling(enabled); @@ -4461,9 +4461,9 @@ void JKQtBasePlotter::set_emitSignals(bool enabled) } -QHash JKQtBasePlotter::tbrh=QHash(); +QHash JKQTBasePlotter::tbrh=QHash(); -JKQtBasePlotter::textSizeKey::textSizeKey(const QFont &f, const QString &text, QPaintDevice *pd) +JKQTBasePlotter::textSizeKey::textSizeKey(const QFont &f, const QString &text, QPaintDevice *pd) { this->text=text; this->f=f; @@ -4480,7 +4480,7 @@ JKQtBasePlotter::textSizeKey::textSizeKey(const QFont &f, const QString &text, Q } } -JKQtBasePlotter::textSizeKey::textSizeKey(const QString &fontName, double fontSize, const QString &text, QPaintDevice *pd) +JKQTBasePlotter::textSizeKey::textSizeKey(const QString &fontName, double fontSize, const QString &text, QPaintDevice *pd) { QFont f; f.setFamily(fontName); @@ -4500,13 +4500,13 @@ JKQtBasePlotter::textSizeKey::textSizeKey(const QString &fontName, double fontSi } } -bool JKQtBasePlotter::textSizeKey::operator==(const JKQtBasePlotter::textSizeKey &other) const +bool JKQTBasePlotter::textSizeKey::operator==(const JKQTBasePlotter::textSizeKey &other) const { return ldpiX==other.ldpiX && ldpiY==other.ldpiY && text==other.text && f==other.f; } -JKQtBasePlotter::textSizeData::textSizeData() +JKQTBasePlotter::textSizeData::textSizeData() { ascent=0; descent=0; @@ -4519,15 +4519,15 @@ JKQtBasePlotter::textSizeData::textSizeData() -bool JKQtBasePlotter::JKQTPPaintDeviceAdapter::useLatexParser() const +bool JKQTBasePlotter::JKQTPPaintDeviceAdapter::useLatexParser() const { return true; } -QPaintDevice *JKQtBasePlotter::JKQTPPaintDeviceAdapter::createPaintdeviceMM(const QString &filename, double widthMM, double heightMM) const +QPaintDevice *JKQTBasePlotter::JKQTPPaintDeviceAdapter::createPaintdeviceMM(const QString &filename, double widthMM, double heightMM) const { return createPaintdevice(filename, widthMM/25.4*QApplication::desktop()->logicalDpiX(), heightMM/25.4*QApplication::desktop()->logicalDpiY()); } -JKQtBasePlotter::JKQTPSaveDataAdapter::~JKQTPSaveDataAdapter() { +JKQTBasePlotter::JKQTPSaveDataAdapter::~JKQTPSaveDataAdapter() { } diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 1cbf9d50da..ff840549a1 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -57,19 +57,19 @@ #define JKQTPBASEPLOTTER_H -class JKQTPgraphsModel; // forward -class JKQTPgraph; // forward -class JKQTPplotElement; // forward +class JKQTPGraphsModel; // forward +class JKQTPGraph; // forward +class JKQTPPlotElement; // forward -/** \brief initialized Qt-ressources necessary for JKQtBasePlotter */ -LIB_EXPORT void initJKQtBasePlotterResources(); +/** \brief initialized Qt-ressources necessary for JKQTBasePlotter */ +LIB_EXPORT void initJKQTBasePlotterResources(); /** \brief base class for 2D plotter classes * \ingroup jkqtpplotterclasses * * This class implements basic functionalities for the plotter classes. Those are: - * -# data storage using a JKQTPdatastore object + * -# data storage using a JKQTPDatastore object * -# coordinate transforms * -# a set of properties for the graphs (colors, widthes ...) and also a system (see getNextStyle() to automatically * choose a drawing style for different graphs. @@ -78,37 +78,37 @@ LIB_EXPORT void initJKQtBasePlotterResources(); * -# saveing and printing the resulting plots * . * - * This class is NOT a widget, if you need a plotting widget, use JKQtPlotter. This class may be used to + * This class is NOT a widget, if you need a plotting widget, use JKQTPLotter. This class may be used to * plot onto any JKQTPEnhancedPainter. * * * * \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 - * data with it. This is imeplemented, using a JKQTPdatastore object together with some convenience access methods. No further - * data access is implemented and child classes are NOT forced to use this datastore. Hide it if you want. JKQtPlotter shows + * data with it. This is imeplemented, using a JKQTPDatastore object together with some convenience access methods. No further + * data access is implemented and child classes are NOT forced to use this datastore. Hide it if you want. JKQTPLotter shows * how to use it. This class implement a graph management, where graphs simply point to a set of columns inside the datastore * that contain the actual plot data! * - * If you call the \link JKQtPlotterBase::JKQtPlotterBase() constructor \endlink with no arguments, it will create an internal - * datastore object and you can start adding data by using get_datastore(). If you have an external JKQTPdatastore object you can + * If you call the \link JKQTPLotterBase::JKQTPLotterBase() constructor \endlink with no arguments, it will create an internal + * datastore object and you can start adding data by using get_datastore(). If you have an external JKQTPDatastore object you can * give it as parameter to the constructor or use one of the other methods: - * - useExternalDatastore(): \copybrief JKQtPlotterBase::useExternalDatastore() - * - useAsInternalDatastore(): \copybrief JKQtPlotterBase::useAsInternalDatastore() - * - useInternalDatastore(): \copybrief JKQtPlotterBase::useInternalDatastore() - * - forceInternalDatastore(): \copybrief JKQtPlotterBase::forceInternalDatastore() + * - useExternalDatastore(): \copybrief JKQTPLotterBase::useExternalDatastore() + * - useAsInternalDatastore(): \copybrief JKQTPLotterBase::useAsInternalDatastore() + * - useInternalDatastore(): \copybrief JKQTPLotterBase::useInternalDatastore() + * - forceInternalDatastore(): \copybrief JKQTPLotterBase::forceInternalDatastore() *. * * * * \section jkqtplotter_base_systems_baseplotter Coordinate Systems and Transformations - * These topics are discussed in the help for JKQTPcoordinateAxis. There is a set of coordinate transform + * These topics are discussed in the help for JKQTPCoordinateAxis. There is a set of coordinate transform * methods (x2p(), y2p(), p2x(), p2y() which only call the respective methods in xAxis and yAxis objects. * * * \section jkqtplotter_base_grids_baseplotter Axis Ticks and Grids * - The plotting of coordinate axes and grids, as well as coordinate transforms is done by - * JKQTPcoordinateAxis descendents (see documentation there) + * JKQTPCoordinateAxis descendents (see documentation there) * . * If you want to set the axis properties, use get_xAxis() or get_yAxis() to get a pointer to the axis objects which then * may be used to set the axis properties. @@ -186,7 +186,7 @@ LIB_EXPORT void initJKQtBasePlotterResources(); * \endcode * . */ -class LIB_EXPORT JKQtBasePlotter: public QObject { +class LIB_EXPORT JKQTBasePlotter: public QObject { Q_OBJECT public: typedef QMap > > AdditionalActionsMap; @@ -194,15 +194,15 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { protected: /** \brief used to plot LaTeX markup */ - JKQTmathText mathText; + JKQTMathText mathText; /** \brief model representing all Plots in this plotter and showing their visible/invisible state */ - JKQTPgraphsModel* m_plotsModel; + JKQTPGraphsModel* m_plotsModel; /** \brief object used for the x-axis */ - JKQTPhorizontalAxis* xAxis; + JKQTPHorizontalAxis* xAxis; /** \brief object used for the y-axis */ - JKQTPverticalAxis* yAxis; + JKQTPVerticalAxis* yAxis; /** \brief filename for the ini file in which to save the user settings * \see jkqtplotter_base_userprops @@ -221,7 +221,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief y position of the current graph in \ref jkqtplotter_base_saveprint */ size_t gridPrintingCurrentY; /** \brief list that manages all the additional graphs for grid printing mode */ - QList gridPrintingList; + QList gridPrintingList; /** \brief this list contains all the rows of the current printing grid and stores its heights */ QList gridPrintingRows; /** \brief this list contains all the columns of the current printing grid and stores its widths */ @@ -243,7 +243,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { QString def_CSVcommentInitializer; /** \brief an object which manages all data columns for this plotter class */ - JKQTPdatastore* datastore; + JKQTPDatastore* datastore; /** \brief indicates whether the datastore is managed (allocated/freed) internally or externally */ bool datastoreInternal; @@ -438,13 +438,13 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /*! \brief default value for property property varname. \see keyYSeparation for more information */ double def_keyYSeparation; /** \brief key position */ - JKQTPkeyPosition keyPosition; + JKQTPKeyPosition keyPosition; /*! \brief default value for property property varname. \see keyPosition for more information */ - JKQTPkeyPosition def_keyPosition; + JKQTPKeyPosition def_keyPosition; /** \brief the key layout */ - JKQTPkeyLayout keyLayout; + JKQTPKeyLayout keyLayout; /*! \brief default value for property property varname. \see keyLayout for more information */ - JKQTPkeyLayout def_keyLayout; + JKQTPKeyLayout def_keyLayout; /** \brief determine width of the key automatically */ bool keyAutosize; /*! \brief default value for property property varname. \see keyAutosize for more information */ @@ -510,10 +510,10 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief a vector that contains all graphs to be plottet in the system */ - QList graphs; + QList graphs; - QList overlays; + QList overlays; /** \brief used as maximum/minimum pixel value for plotting */ @@ -523,7 +523,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief hidden default constructor */ - JKQtBasePlotter(); + JKQTBasePlotter(); @@ -622,7 +622,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { QString currentPrinter; /** \brief the master plotter, this plotter is connected to. */ - JKQtBasePlotter* masterPlotter; + JKQTBasePlotter* masterPlotter; /** \brief synchronize plot width with masterPlotter */ bool masterSynchronizeWidth; /** \brief synchronize plot height with masterPlotter */ @@ -737,11 +737,11 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { void getDataColumnsByUserItemChanged(QListWidgetItem* widgetitem); void showPlotData(); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis */ - void synchronizeXAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* sender); + void synchronizeXAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis */ - void synchronizeYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* sender); + void synchronizeYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x- and y-axis to the other x- and y-axis */ - void synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* sender); + void synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); public slots: @@ -873,23 +873,23 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * will be managed (freed) by this class. If \a datastore_internal is \c false the class will use tha datastore provided * in \a datast as an external datastore. You can modify this later by using useInternalDatastore() and useExternalDatastore(). */ - JKQtBasePlotter(bool datastore_internal, QObject* parent=nullptr, JKQTPdatastore* datast=nullptr); + JKQTBasePlotter(bool datastore_internal, QObject* parent=nullptr, JKQTPDatastore* datast=nullptr); /** \brief class destructor */ - virtual ~JKQtBasePlotter(); + virtual ~JKQTBasePlotter(); /** \brief returns a pointer to the datastore used by this object */ - inline JKQTPdatastore* getDatastore() { return datastore; } + inline JKQTPDatastore* getDatastore() { return datastore; } /** \brief returns model representing all Plots in this plotter and showing their visible/invisible state */ - inline JKQTPgraphsModel* getPlotsModel() { return m_plotsModel; } + inline JKQTPGraphsModel* getPlotsModel() { return m_plotsModel; } /** \brief returns a pointer to the datastore used by this object */ - inline const JKQTPdatastore* getDatastore() const { return datastore; } + inline const JKQTPDatastore* getDatastore() const { return datastore; } /** \brief returns model representing all Plots in this plotter and showing their visible/invisible state */ - inline const JKQTPgraphsModel* getPlotsModel() const { return m_plotsModel; } + inline const JKQTPGraphsModel* getPlotsModel() const { return m_plotsModel; } /** \brief tells the plotter object to use the given external datastore. * @@ -897,12 +897,12 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * with external management. If the current datastore is already external, this method will simply replace it by the * new one. */ - void useExternalDatastore(JKQTPdatastore* newStore); + void useExternalDatastore(JKQTPDatastore* newStore); /** \brief tells the plotter object to use the given external datastore and treat it as an internal one (i.e. free it * when the plotter object ist destroyed. */ - void useAsInternalDatastore(JKQTPdatastore* newStore); + void useAsInternalDatastore(JKQTPDatastore* newStore); /** \brief tells the plotter object to use an internal datastore. A new internal datastore object is generated only if * the current datastore is not internal. @@ -1046,8 +1046,8 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief add a new plotter for grid printing mode */ - inline void addGridPrintingPlotter(size_t x, size_t y, JKQtBasePlotter* plotter) { - JKQTPgridPrintingItem i; + inline void addGridPrintingPlotter(size_t x, size_t y, JKQTBasePlotter* plotter) { + JKQTPGridPrintingItem i; i.x=x; i.y=y; i.plotter=plotter; @@ -1083,7 +1083,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { int getNextStyle(); - /** \brief represents a pen, when plotting in JKQtPlotter/JKQtBasePlotter */ + /** \brief represents a pen, when plotting in JKQTPLotter/JKQTBasePlotter */ struct JKQTPPen { QColor m_color; double m_width; @@ -1632,7 +1632,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /*! \brief sets the property keyPosition to the specified \a __value. \details Description of the parameter keyPosition is:
\copybrief keyPosition
\see keyPosition for more information */ - inline virtual void set_keyPosition(const JKQTPkeyPosition & __value) + inline virtual void set_keyPosition(const JKQTPKeyPosition & __value) { if (this->keyPosition != __value) { this->keyPosition = __value; @@ -1642,14 +1642,14 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /*! \brief returns the property keyPosition. \details Description of the parameter keyPosition is:
\copybrief keyPosition
\see keyPosition for more information */ - inline virtual JKQTPkeyPosition get_keyPosition() const + inline virtual JKQTPKeyPosition get_keyPosition() const { return this->keyPosition; } /*! \brief sets the property keyLayout to the specified \a __value. \details Description of the parameter keyLayout is:
\copybrief keyLayout
\see keyLayout for more information */ - inline virtual void set_keyLayout(const JKQTPkeyLayout & __value) + inline virtual void set_keyLayout(const JKQTPKeyLayout & __value) { if (this->keyLayout != __value) { this->keyLayout = __value; @@ -1659,7 +1659,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /*! \brief returns the property keyLayout. \details Description of the parameter keyLayout is:
\copybrief keyLayout
\see keyLayout for more information */ - inline virtual JKQTPkeyLayout get_keyLayout() const + inline virtual JKQTPKeyLayout get_keyLayout() const { return this->keyLayout; } @@ -1827,18 +1827,18 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { inline int get_plotWidth() const { return this->plotWidth; } /*! \brief returns the property plotHeight. \details Description of the parameter plotHeight is:
\copybrief plotHeight
. \see plotHeight for more information */ inline int get_plotHeight() const { return this->plotHeight; } - /** \brief returns the internal JKQTmathText, used to render text with LaTeX markup */ - inline JKQTmathText* get_mathText() { return &mathText; } - /** \brief returns the internal JKQTmathText, used to render text with LaTeX markup */ - inline const JKQTmathText* get_mathText() const { return &mathText; } + /** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */ + inline JKQTMathText* get_mathText() { return &mathText; } + /** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */ + inline const JKQTMathText* get_mathText() const { return &mathText; } /** \brief returns the x-axis objet of the plot */ - inline JKQTPhorizontalAxis* get_xAxis() { return xAxis; } + inline JKQTPHorizontalAxis* get_xAxis() { return xAxis; } /** \brief returns the y-axis objet of the plot */ - inline JKQTPverticalAxis* get_yAxis() { return yAxis; } + inline JKQTPVerticalAxis* get_yAxis() { return yAxis; } /** \brief returns the x-axis objet of the plot */ - inline const JKQTPhorizontalAxis* get_xAxis() const { return xAxis; } + inline const JKQTPHorizontalAxis* get_xAxis() const { return xAxis; } /** \brief returns the y-axis objet of the plot */ - inline const JKQTPverticalAxis* get_yAxis() const { return yAxis; } + inline const JKQTPVerticalAxis* get_yAxis() const { return yAxis; } /*! \brief returns the property actSavePlot. \details Description of the parameter actSavePlot is:
\copybrief actSavePlot
. \see actSavePlot for more information */ @@ -1934,7 +1934,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief returns description of i'th graph */ - JKQTPplotElement* getGraph(size_t i); + JKQTPPlotElement* getGraph(size_t i); /** \brief returns the number of graphs */ size_t getGraphCount(); @@ -1943,7 +1943,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { void deleteGraph(size_t i, bool deletegraph=true); /** \brief remove the given graph, if it is contained */ - void deleteGraph(JKQTPplotElement* gr, bool deletegraph=true); + void deleteGraph(JKQTPPlotElement* gr, bool deletegraph=true); /** \brief remove all plots * @@ -1956,19 +1956,19 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { void setGraphVisible(int i, bool visible=true); /** \brief add a new graph, returns it's position in the graphs list, if the graph is already in the plot, this returns the index in the list */ - size_t addGraph(JKQTPplotElement* gr); + size_t addGraph(JKQTPPlotElement* gr); /** \brief returns \c true, if the given graph is in this plot */ - bool containsGraph(JKQTPplotElement* gr) const; + bool containsGraph(JKQTPPlotElement* gr) const; /** \brief move the given graph to the top, or add it, if it is not yet contained */ - size_t moveGraphTop(JKQTPplotElement* gr); + size_t moveGraphTop(JKQTPPlotElement* gr); /** \brief move the given graph to the top, or add it, if it is not yet contained */ - size_t moveGraphBottom(JKQTPplotElement* gr); + size_t moveGraphBottom(JKQTPPlotElement* gr); /** \brief add a new graphs from a QVector */ - template - inline void addGraphs(const TJKQTPgraphContainer& gr) { + template + inline void addGraphs(const TJKQTPGraphContainer& gr) { for (auto it=gr.begin(); it!=gr.end(); ++it) { addGraph(*it); } @@ -1981,17 +1981,17 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * \param title a title for this specific graph which can be displayed in the key * \param graphStyle the way how to plot the graph * - * Both point to columns in the datastore explained in the JKQtPlotterBase class. The plotWidth, color, pen style ... - * will be extracted from the automatic plot style creation mechanism implemented in JKQtPlotterBase::getNextStyle(). + * Both point to columns in the datastore explained in the JKQTPLotterBase class. The plotWidth, color, pen style ... + * will be extracted from the automatic plot style creation mechanism implemented in JKQTPLotterBase::getNextStyle(). * If you want to change them either use another overloaded version of addGraph(), or use getGraph() and setGraph(): * \code * size_t i=addGraph(0,1,"graph1"); - * JKQTPplotElement gr=getGraph(i); + * JKQTPPlotElement gr=getGraph(i); * gr.color=QColor("red"); * setGraph(i, gr); * \endcode */ - size_t addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPgraphPlotstyle graphStyle=JKQTPlines); + size_t addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPLines); /** \brief add a new graph, returns it's position in the graphs list. * @@ -2004,10 +2004,10 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * \param width width (in pixel) of the graph * \param penstyle the drawing style (solid, dashed ...) of the graph lines. * - * Both point to columns in the datastore explained in the JKQtPlotterBase class. + * Both point to columns in the datastore explained in the JKQTPLotterBase class. * The symbolSize is set to 10 and no error information is expected. */ - size_t addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPgraphPlotstyle graphStyle, QColor color, JKQTPgraphSymbols symbol=JKQTPcross, Qt::PenStyle penstyle=Qt::SolidLine, double width=2); + size_t addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPGraphPlotstyle graphStyle, QColor color, JKQTPGraphSymbols symbol=JKQTPCross, Qt::PenStyle penstyle=Qt::SolidLine, double width=2); /** \brief add a new graph with x-error information, returns it's position in the graphs list. * @@ -2019,10 +2019,10 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * \param graphStyle the way how to plot the graph * \param errorStyle the drawing style (bars, lines ...) of the errors. * - * Both point to columns in the datastore explained in the JKQtPlotterBase class. + * Both point to columns in the datastore explained in the JKQTPLotterBase class. * The symbolSize is set to 10 and no error information is expected. */ - size_t addGraphWithXError(size_t xColumn, size_t yColumn, size_t xErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle=JKQTPpoints, JKQTPerrorPlotstyle errorStyle=JKQTPerrorBars); + size_t addGraphWithXError(size_t xColumn, size_t yColumn, size_t xErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPPoints, JKQTPErrorPlotstyle errorStyle=JKQTPErrorBars); /** \brief add a new graph with x-error information, returns it's position in the graphs list. * @@ -2034,10 +2034,10 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * \param graphStyle the way how to plot the graph * \param errorStyle the drawing style (bars, lines ...) of the errors. * - * Both point to columns in the datastore explained in the JKQtPlotterBase class. + * Both point to columns in the datastore explained in the JKQTPLotterBase class. * The symbolSize is set to 10 and no error information is expected. */ - size_t addGraphWithYError(size_t xColumn, size_t yColumn, size_t yErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle=JKQTPpoints, JKQTPerrorPlotstyle errorStyle=JKQTPerrorBars); + size_t addGraphWithYError(size_t xColumn, size_t yColumn, size_t yErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPPoints, JKQTPErrorPlotstyle errorStyle=JKQTPErrorBars); /** \brief add a new graph with x-error information, returns it's position in the graphs list. * @@ -2049,11 +2049,11 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * \param title a title for this specific graph which can be displayed in the key * \param graphStyle the way how to plot the graph * - * Both point to columns in the datastore explained in the JKQtPlotterBase class. - * The symbolSize is set to 10 and no error information is expected. The errorStyle is set to JKQTPerrorBars + * Both point to columns in the datastore explained in the JKQTPLotterBase class. + * The symbolSize is set to 10 and no error information is expected. The errorStyle is set to JKQTPErrorBars * for both directions. */ - size_t addGraphWithXYError(size_t xColumn, size_t yColumn, size_t xErrorColumn, size_t yErrorColumn, QString title, JKQTPgraphPlotstyle graphStyle=JKQTPpoints); + size_t addGraphWithXYError(size_t xColumn, size_t yColumn, size_t xErrorColumn, size_t yErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPPoints); /** \brief add a boxplot graph to the plot * @@ -2138,7 +2138,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { \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 */ - void synchronizeToMaster(JKQtBasePlotter* master, bool synchronizeWidth, bool synchronizeHeight, bool synchronizeZoomingMasterToSlave=false, bool synchronizeZoomingSlaveToMaster=false); + void synchronizeToMaster(JKQTBasePlotter* master, bool synchronizeWidth, bool synchronizeHeight, bool synchronizeZoomingMasterToSlave=false, bool synchronizeZoomingSlaveToMaster=false); /** \brief switches any synchronization off, that has been created by synchronizeToMaster() */ void resetMasterSynchronization(); @@ -2150,7 +2150,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief returns description of i'th overlay element */ - JKQTPoverlayElement* getOverlayElement(size_t i); + JKQTPOverlayElement* getOverlayElement(size_t i); /** \brief returns the number of overlay elements */ size_t getOverlayElementCount(); @@ -2159,7 +2159,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { void deleteOverlayElement(size_t i, bool deletegraph=true); /** \brief remove the given overlay element, if it is contained */ - void deleteOverlayElement(JKQTPoverlayElement* gr, bool deletegraph=true); + void deleteOverlayElement(JKQTPOverlayElement* gr, bool deletegraph=true); /** \brief remove all overlay elements * @@ -2168,22 +2168,22 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { void clearOverlayElement(bool deleteGraphs=true); /** \brief add a new overlay element, returns it's position in the overlay elements list, if the overlay element is already in the plot, this returns the index in the list */ - size_t addOverlayElement(JKQTPoverlayElement* gr); + size_t addOverlayElement(JKQTPOverlayElement* gr); /** \brief returns \c true, if the given overlay element is in this plot */ - bool containsOverlayElement(JKQTPoverlayElement* gr) const; + bool containsOverlayElement(JKQTPOverlayElement* gr) const; /** \brief move the given overlay element to the top, or add it, if it is not yet contained */ - size_t moveOverlayElementTop(JKQTPoverlayElement* gr); + size_t moveOverlayElementTop(JKQTPOverlayElement* gr); /** \brief add a new overlay elements from a QList */ - void addOverlayElements(const QList& gr); + void addOverlayElements(const QList& gr); QVector getBoundingLinesX1Y1(QRectF *rect=nullptr) const; signals: /** \brief signal: emitted whenever the user selects a new x-y zoom range (by mouse) */ - void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* sender); + void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); /** \brief emitted when the plot has to be updated */ void plotUpdated(); @@ -2199,15 +2199,15 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { public: - /** \brief set a global preset/default value for the userSettigsFilename and userSettigsPrefix properties of JKQtBasePlotter + /** \brief set a global preset/default value for the userSettigsFilename and userSettigsPrefix properties of JKQTBasePlotter * - * These presets are application global and will be used ONLY on initialization of a JKQtBasePlotter. You can overwrite them - * on a local-basis for each JKQtBasePrinter separately. The changed values from this function call will only take effect for + * These presets are application global and will be used ONLY on initialization of a JKQTBasePlotter. You can overwrite them + * on a local-basis for each JKQTBasePrinter separately. The changed values from this function call will only take effect for * newly created plotters AFTER the function call! */ - static void setDefaultJKQtBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix); + static void setDefaultJKQTBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix); - /** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQtBasePlotter/JKQtPlotter + /** \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 */ class LIB_EXPORT JKQTPPaintDeviceAdapter { public: @@ -2227,10 +2227,10 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { virtual QPaintDevice* createPaintdeviceMM(const QString& filename, double widthMM, double heightMM) const; }; - /** \brief register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQtBasePlotter/JKQtPlotter, + /** \brief register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQTBasePlotter/JKQTPLotter, * which will use it to export graphics */ static void registerPaintDeviceAdapter(JKQTPPaintDeviceAdapter* adapter); - /** \brief de-register a JKQTPPaintDeviceAdapter from JKQtBasePlotter/JKQtPlotter */ + /** \brief de-register a JKQTPPaintDeviceAdapter from JKQTBasePlotter/JKQTPLotter */ static void deregisterPaintDeviceAdapter(JKQTPPaintDeviceAdapter* adapter); @@ -2242,9 +2242,9 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { virtual void saveJKQTPData(const QString& filename, const QList >& data, const QStringList& columnNames) const=0; }; - /** \brief register a JKQTPSaveDataAdapter with JKQtPlotter/JKQtBasePlotter that can be used to export data from the internal datastore into a file */ + /** \brief register a JKQTPSaveDataAdapter with JKQTPLotter/JKQTBasePlotter that can be used to export data from the internal datastore into a file */ static bool registerSaveDataAdapter(JKQTPSaveDataAdapter* adapter); - /** \brief de-register a JKQTPSaveDataAdapter from JKQtPlotter/JKQtBasePlotter */ + /** \brief de-register a JKQTPSaveDataAdapter from JKQTPLotter/JKQTBasePlotter */ static bool deregisterSaveDataAdapter(JKQTPSaveDataAdapter* adapter); /** \brief internal tool class for text sizes @@ -2273,11 +2273,11 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { QSizeF getTextSizeSize(const QString& fontName, double fontSize, const QString& text, QPainter &painter); protected: - static QHash tbrh; + static QHash tbrh; }; -inline uint qHash(const JKQtBasePlotter::textSizeKey& data) { +inline uint qHash(const JKQTBasePlotter::textSizeKey& data) { return qHash(data.f.family())+qHash(data.text); } diff --git a/lib/jkqtplotter/jkqtpdatastorage.cpp b/lib/jkqtplotter/jkqtpdatastorage.cpp index f5b493625f..c11741914b 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.cpp +++ b/lib/jkqtplotter/jkqtpdatastorage.cpp @@ -30,10 +30,10 @@ /************************************************************************************************************************** - * JKQTPcolumn + * JKQTPColumn **************************************************************************************************************************/ //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPcolumn::JKQTPcolumn() +JKQTPColumn::JKQTPColumn() { datastore=nullptr; name=""; @@ -43,7 +43,7 @@ JKQTPcolumn::JKQTPcolumn() } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPcolumn::JKQTPcolumn(JKQTPdatastore *datastore, const QString &name, size_t datastoreItem, size_t datastoreOffset) +JKQTPColumn::JKQTPColumn(JKQTPDatastore *datastore, const QString &name, size_t datastoreItem, size_t datastoreOffset) { this->datastore=datastore; this->datastoreItem=datastoreItem; @@ -54,21 +54,21 @@ JKQTPcolumn::JKQTPcolumn(JKQTPdatastore *datastore, const QString &name, size_t } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPcolumn::~JKQTPcolumn() +JKQTPColumn::~JKQTPColumn() { } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPcolumn::getRows() const { +size_t JKQTPColumn::getRows() const { if (!valid || !datastore) return 0; - JKQTPdatastoreItem* i=datastore->getItem(datastoreItem); + JKQTPDatastoreItem* i=datastore->getItem(datastoreItem); if (i) return i->get_rows(); else return 0; } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPcolumn::copyData(QVector ©To) const +void JKQTPColumn::copyData(QVector ©To) const { const double* d=getPointer(0); copyTo.clear(); @@ -82,7 +82,7 @@ void JKQTPcolumn::copyData(QVector ©To) const } //////////////////////////////////////////////////////////////////////////////////////////////// -QVector JKQTPcolumn::copyData() +QVector JKQTPColumn::copyData() { QVector d; copyData(d); @@ -91,7 +91,7 @@ QVector JKQTPcolumn::copyData() //////////////////////////////////////////////////////////////////////////////////////////////// -const double *JKQTPcolumn::getPointer(size_t n) const +const double *JKQTPColumn::getPointer(size_t n) const { if (!datastore) return nullptr; if (!datastore->getItem(datastoreItem)) return nullptr; @@ -99,7 +99,7 @@ const double *JKQTPcolumn::getPointer(size_t n) const } //////////////////////////////////////////////////////////////////////////////////////////////// -double *JKQTPcolumn::getPointer(size_t n) +double *JKQTPColumn::getPointer(size_t n) { if (!datastore) return nullptr; if (!datastore->getItem(datastoreItem)) return nullptr; @@ -108,9 +108,9 @@ double *JKQTPcolumn::getPointer(size_t n) //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPcolumn::copy(double* data, size_t N, size_t offset) { +void JKQTPColumn::copy(double* data, size_t N, size_t offset) { if (!datastore) return ; - JKQTPdatastoreItem* it=datastore->getItem(datastoreItem); + JKQTPDatastoreItem* it=datastore->getItem(datastoreItem); if (!it) return; for (size_t i=0; iset(datastoreOffset, i+offset, data[i]); @@ -118,7 +118,7 @@ void JKQTPcolumn::copy(double* data, size_t N, size_t offset) { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPcolumn::exchange(double value, double replace) +void JKQTPColumn::exchange(double value, double replace) { if (!datastore) return ; for (size_t i=0; idataformat=JKQTPsingleColumn; +JKQTPDatastoreItem::JKQTPDatastoreItem(){ + this->dataformat=JKQTPSingleColumn; this->allocated=false; this->data=nullptr; this->columns=0; @@ -182,14 +182,14 @@ JKQTPdatastoreItem::JKQTPdatastoreItem(){ } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreItem::JKQTPdatastoreItem(size_t columns, size_t rows){ +JKQTPDatastoreItem::JKQTPDatastoreItem(size_t columns, size_t rows){ this->internal=true; this->allocated=false; if (columns>1) { - this->dataformat=JKQTPmatrixRow; + this->dataformat=JKQTPMatrixRow; this->data=(double*)calloc(columns*rows, sizeof(double)); } else { - this->dataformat=JKQTPsingleColumn; + this->dataformat=JKQTPSingleColumn; this->data=(double*)calloc(rows, sizeof(double)); } this->columns=columns; @@ -198,7 +198,7 @@ JKQTPdatastoreItem::JKQTPdatastoreItem(size_t columns, size_t rows){ } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastoreItem::resizeColumns(size_t new_rows) { +void JKQTPDatastoreItem::resizeColumns(size_t new_rows) { if (internal && allocated && data!=nullptr) { free(data); data=nullptr; @@ -210,7 +210,7 @@ void JKQTPdatastoreItem::resizeColumns(size_t new_rows) { } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreItem::JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columns, size_t rows){ +JKQTPDatastoreItem::JKQTPDatastoreItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columns, size_t rows){ this->dataformat=dataformat; this->allocated=true; this->data=data; @@ -220,7 +220,7 @@ JKQTPdatastoreItem::JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, doub } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreItem::JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, double *data, size_t columns, size_t rows, bool internal) +JKQTPDatastoreItem::JKQTPDatastoreItem(JKQTPDatastoreItemFormat dataformat, double *data, size_t columns, size_t rows, bool internal) { this->dataformat=dataformat; this->allocated=true; @@ -231,7 +231,7 @@ JKQTPdatastoreItem::JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, doub } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreItem::~JKQTPdatastoreItem(){ +JKQTPDatastoreItem::~JKQTPDatastoreItem(){ if (internal && allocated && data!=nullptr) { free(data); data=nullptr; @@ -241,11 +241,11 @@ JKQTPdatastoreItem::~JKQTPdatastoreItem(){ /************************************************************************************************************************** - * JKQTPdatastore + * JKQTPDatastore **************************************************************************************************************************/ //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addItem(JKQTPdatastoreItem* item) { +size_t JKQTPDatastore::addItem(JKQTPDatastoreItem* item) { /*items.push_back(item); return items.size()-1;*/ items.insert(maxItemID, item); @@ -254,14 +254,14 @@ size_t JKQTPdatastore::addItem(JKQTPdatastoreItem* item) { } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addColumn(JKQTPcolumn col) { +size_t JKQTPDatastore::addColumn(JKQTPColumn col) { columns.insert(maxColumnsID, col); maxColumnsID++; return maxColumnsID-1; } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastore::JKQTPdatastore() +JKQTPDatastore::JKQTPDatastore() { maxItemID=0; maxColumnsID=0; @@ -269,7 +269,7 @@ JKQTPdatastore::JKQTPdatastore() } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::clear(){ +void JKQTPDatastore::clear(){ maxItemID=0; maxColumnsID=0; /*if (items.size()>0) { @@ -277,7 +277,7 @@ void JKQTPdatastore::clear(){ delete items[i]; } }*/ - QMapIterator it(items); + QMapIterator it(items); while (it.hasNext()) { it.next(); delete it.value(); @@ -287,9 +287,9 @@ void JKQTPdatastore::clear(){ } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::deleteAllColumns(const QString& name, bool removeItems) { +void JKQTPDatastore::deleteAllColumns(const QString& name, bool removeItems) { QList ids; - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (it.value().get_name()==name) { @@ -302,9 +302,9 @@ void JKQTPdatastore::deleteAllColumns(const QString& name, bool removeItems) { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::deleteAllPrefixedColumns(QString prefix, bool removeItems) { +void JKQTPDatastore::deleteAllPrefixedColumns(QString prefix, bool removeItems) { QList ids; - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (it.value().get_name().startsWith(prefix)) { @@ -318,11 +318,11 @@ void JKQTPdatastore::deleteAllPrefixedColumns(QString prefix, bool removeItems) } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::deleteColumn(size_t column, bool removeItems) { +void JKQTPDatastore::deleteColumn(size_t column, bool removeItems) { if (removeItems) { size_t dsitem=columns[column].get_datastoreItem(); int cnt=0; - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (it.value().get_datastoreItem()==dsitem) { @@ -338,9 +338,9 @@ void JKQTPdatastore::deleteColumn(size_t column, bool removeItems) { } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getColumnNum(const QString& name) { +int JKQTPDatastore::getColumnNum(const QString& name) { if (columns.size()<=0) return -1; - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (it.value().get_name()==name) return it.key(); @@ -349,9 +349,9 @@ int JKQTPdatastore::getColumnNum(const QString& name) { } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::ensureColumnNum(const QString& name) { +size_t JKQTPDatastore::ensureColumnNum(const QString& name) { if (columns.size()<=0) return -1; - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (it.value().get_name()==name) return it.key(); @@ -360,31 +360,31 @@ size_t JKQTPdatastore::ensureColumnNum(const QString& name) { } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPcolumn JKQTPdatastore::getColumn(size_t i) const +JKQTPColumn JKQTPDatastore::getColumn(size_t i) const { return columns.value(i); } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPcolumn JKQTPdatastore::getColumn(int i) const +JKQTPColumn JKQTPDatastore::getColumn(int i) const { return columns.value(i); } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addCopiedItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columnsnum, size_t rows) { - JKQTPdatastoreItem* it=nullptr; - if ((dataformat==JKQTPsingleColumn)||(columnsnum==1)) { +size_t JKQTPDatastore::addCopiedItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columnsnum, size_t rows) { + JKQTPDatastoreItem* it=nullptr; + if ((dataformat==JKQTPSingleColumn)||(columnsnum==1)) { return addCopiedItem(data, rows); - } else if (dataformat==JKQTPmatrixColumn) { - it=new JKQTPdatastoreItem(columnsnum, rows); + } else if (dataformat==JKQTPMatrixColumn) { + it=new JKQTPDatastoreItem(columnsnum, rows); for (size_t c=0; cset(c, r, data[c*rows+r]); } } - } else if (dataformat==JKQTPmatrixColumn) { - it=new JKQTPdatastoreItem(columnsnum, rows); + } else if (dataformat==JKQTPMatrixColumn) { + it=new JKQTPDatastoreItem(columnsnum, rows); for (size_t r=0; rset(c, r, data[r*columnsnum+c]); @@ -399,43 +399,43 @@ size_t JKQTPdatastore::addCopiedItem(JKQTPdatastoreItemFormat dataformat, double //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addItem(size_t rows) { - /*items.push_back(new JKQTPdatastoreItem(1, rows)); +size_t JKQTPDatastore::addItem(size_t rows) { + /*items.push_back(new JKQTPDatastoreItem(1, rows)); return items.size()-1;*/ - return addItem(new JKQTPdatastoreItem(1, rows)); + return addItem(new JKQTPDatastoreItem(1, rows)); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addItem(size_t columnsnum, size_t rows) { - /*items.push_back(new JKQTPdatastoreItem(columnsnum, rows)); +size_t JKQTPDatastore::addItem(size_t columnsnum, size_t rows) { + /*items.push_back(new JKQTPDatastoreItem(columnsnum, rows)); return items.size()-1;*/ - return addItem(new JKQTPdatastoreItem(columnsnum, rows)); + return addItem(new JKQTPDatastoreItem(columnsnum, rows)); }; /** \brief add one external column to the datastore. It contains \a rows rows.*/ -size_t JKQTPdatastore::addItem(double* data, size_t rows) { - /*items.push_back(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows)); +size_t JKQTPDatastore::addItem(double* data, size_t rows) { + /*items.push_back(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows)); return items.size()-1;*/ - return addItem(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows)); + return addItem(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows)); } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addInternalItem(double *data, size_t rows) +size_t JKQTPDatastore::addInternalItem(double *data, size_t rows) { - JKQTPdatastoreItem* dsi=new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows, true); + JKQTPDatastoreItem* dsi=new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows, true); return addItem(dsi); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columnsnum, size_t rows) { - /*items.push_back(new JKQTPdatastoreItem(dataformat, data, columnsnum, rows)); +size_t JKQTPDatastore::addItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columnsnum, size_t rows) { + /*items.push_back(new JKQTPDatastoreItem(dataformat, data, columnsnum, rows)); return items.size()-1;*/ - return addItem(new JKQTPdatastoreItem(dataformat, data, columnsnum, rows)); + return addItem(new JKQTPDatastoreItem(dataformat, data, columnsnum, rows)); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addCopiedItem(const double* data, size_t rows) { - JKQTPdatastoreItem* it=new JKQTPdatastoreItem(1, rows); +size_t JKQTPDatastore::addCopiedItem(const double* data, size_t rows) { + JKQTPDatastoreItem* it=new JKQTPDatastoreItem(1, rows); if (data) { for (size_t i=0; iset(0, i, data[i]); @@ -448,38 +448,38 @@ size_t JKQTPdatastore::addCopiedItem(const double* data, size_t rows) { }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addColumnForItem(size_t itemID, size_t columnInItem, const QString& name) { - /*JKQTPcolumn c(this, name, itemID, columnInItem); +size_t JKQTPDatastore::addColumnForItem(size_t itemID, size_t columnInItem, const QString& name) { + /*JKQTPColumn c(this, name, itemID, columnInItem); columns.push_back(c); return columns.size()-1;*/ - return addColumn(JKQTPcolumn(this, name, itemID, columnInItem)); + return addColumn(JKQTPColumn(this, name, itemID, columnInItem)); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addColumn(size_t rows, const QString& name) { - //items.push_back(new JKQTPdatastoreItem(1, rows)); +size_t JKQTPDatastore::addColumn(size_t rows, const QString& name) { + //items.push_back(new JKQTPDatastoreItem(1, rows)); //return addColumnForItem(items.size()-1, 0, name); - size_t item= addItem(new JKQTPdatastoreItem(1, rows)); + size_t item= addItem(new JKQTPDatastoreItem(1, rows)); return addColumnForItem(item, 0, name); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addColumn(double* data, size_t rows, const QString& name) { - //items.push_back(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows)); +size_t JKQTPDatastore::addColumn(double* data, size_t rows, const QString& name) { + //items.push_back(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows)); //std::cout<<"added item\n"; //size_t it=items.size()-1; //std::cout<<"adding column\n"; - size_t it=addItem(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows)); + size_t it=addItem(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows)); return addColumnForItem(it, 0, name); }; //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addInternalColumn(double* data, size_t rows, const QString& name) { - //items.push_back(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows)); +size_t JKQTPDatastore::addInternalColumn(double* data, size_t rows, const QString& name) { + //items.push_back(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows)); //std::cout<<"added item\n"; //size_t it=items.size()-1; //std::cout<<"adding column\n"; - size_t it=addItem(new JKQTPdatastoreItem(JKQTPsingleColumn, data, 1, rows,true)); + size_t it=addItem(new JKQTPDatastoreItem(JKQTPSingleColumn, data, 1, rows,true)); return addColumnForItem(it, 0, name); }; @@ -492,9 +492,9 @@ size_t JKQTPdatastore::addInternalColumn(double* data, size_t rows, const QStrin //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::copyColumn(size_t old_column, size_t start, size_t stride, const QString& name) +size_t JKQTPDatastore::copyColumn(size_t old_column, size_t start, size_t stride, const QString& name) { - JKQTPcolumn old=columns[old_column]; + JKQTPColumn old=columns[old_column]; size_t rows=old.getRows(); double* d=(double*)malloc(rows*sizeof(double)); double* dd=old.getPointer(0); @@ -510,16 +510,16 @@ size_t JKQTPdatastore::copyColumn(size_t old_column, size_t start, size_t stride } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::copyColumn(size_t old_column, const QString& name) +size_t JKQTPDatastore::copyColumn(size_t old_column, const QString& name) { return copyColumn(old_column, 0, 1, name); } //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::addLinearColumn(size_t rows, double start, double end, const QString& name) { +size_t JKQTPDatastore::addLinearColumn(size_t rows, double start, double end, const QString& name) { double delta=(end-start)/(double)(rows-1); - JKQTPdatastoreItem* it=new JKQTPdatastoreItem(1, rows); + JKQTPDatastoreItem* it=new JKQTPDatastoreItem(1, rows); for (size_t i=0; iset(0, i, start+(double)i * delta); //std::cout<<"copy@"<=0) return getNextLowerIndex(column, row, 0, end); else if (start>=0 && end<0) return getNextLowerIndex(column, row, start, col.getRows()-1); else if (start<0 && end<0) return getNextLowerIndex(column, row, 0, col.getRows()-1); @@ -560,15 +560,15 @@ int JKQTPdatastore::getNextLowerIndex(size_t column, size_t row, int start, int } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextLowerIndex(size_t column, size_t row) const +int JKQTPDatastore::getNextLowerIndex(size_t column, size_t row) const { return getNextLowerIndex(column, row, 0, columns[column].getRows()-1); } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextHigherIndex(size_t column, size_t row, int start, int end) const +int JKQTPDatastore::getNextHigherIndex(size_t column, size_t row, int start, int end) const { - const JKQTPcolumn& col=columns[column]; + const JKQTPColumn& col=columns[column]; if (start<0 && end>=0) return getNextHigherIndex(column, row, 0, end); else if (start>=0 && end<0) return getNextHigherIndex(column, row, start, col.getRows()-1); else if (start<0 && end<0) return getNextHigherIndex(column, row, 0, col.getRows()-1); @@ -591,23 +591,23 @@ int JKQTPdatastore::getNextHigherIndex(size_t column, size_t row, int start, int } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextHigherIndex(size_t column, size_t row) const +int JKQTPDatastore::getNextHigherIndex(size_t column, size_t row) const { return getNextHigherIndex(column, row, 0, columns[column].getRows()-1); } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextLowerIndex(int column, size_t row, int start, int end) const { +int JKQTPDatastore::getNextLowerIndex(int column, size_t row, int start, int end) const { return getNextLowerIndex(static_cast(column), row, start, end); } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextLowerIndex(int column, size_t row) const { +int JKQTPDatastore::getNextLowerIndex(int column, size_t row) const { return getNextLowerIndex(static_cast(column), row); } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextHigherIndex(int column, size_t row, int start, int end) const { +int JKQTPDatastore::getNextHigherIndex(int column, size_t row, int start, int end) const { return getNextHigherIndex(static_cast(column), row, start, end); } @@ -615,13 +615,13 @@ int JKQTPdatastore::getNextHigherIndex(int column, size_t row, int start, int en //////////////////////////////////////////////////////////////////////////////////////////////// -size_t JKQTPdatastore::getMaxRows() { +size_t JKQTPDatastore::getMaxRows() { size_t res=0; /*for (size_t i=0; ires) res=r; }*/ - QMapIterator it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); size_t r=it.value().getRows(); @@ -632,7 +632,7 @@ size_t JKQTPdatastore::getMaxRows() { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::saveCSV(QString filename, QSet userColumns, QString separator, QString decimal_separator, QString comment, QString aroundStrings, char floatformat) { +void JKQTPDatastore::saveCSV(QString filename, QSet userColumns, QString separator, QString decimal_separator, QString comment, QString aroundStrings, char floatformat) { //std::cout< userColumns, QString se } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::saveMatlab(QString filename, QSet userColumns) { +void JKQTPDatastore::saveMatlab(QString filename, QSet userColumns) { //std::cout< userColumns) { } //////////////////////////////////////////////////////////////////////////////////////////////// -QStringList JKQTPdatastore::getColumnNames() const { +QStringList JKQTPDatastore::getColumnNames() const { QStringList names; - QMapIterator it(columns); + QMapIterator it(columns); int col=0; while (it.hasNext()) { it.next(); @@ -675,7 +675,7 @@ QStringList JKQTPdatastore::getColumnNames() const { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::saveMatlab(QTextStream &txt, QSet userColumns) { +void JKQTPDatastore::saveMatlab(QTextStream &txt, QSet userColumns) { //std::cout< userColumns) { /* if (comment.size()>0) { txt< it(columns); + QMapIterator it(columns); while (it.hasNext()) { it.next(); if (!first) txt< userColumns) { } txt<<"\n"; }*/ - QMapIterator it(columns); + QMapIterator it(columns); int col=0; int i=0; while (it.hasNext()) { @@ -732,7 +732,7 @@ void JKQTPdatastore::saveMatlab(QTextStream &txt, QSet userColumns) { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::saveCSV(QTextStream& txt, QSet userColumns, QString separator, QString decimal_separator, QString comment, QString aroundStrings, char floatformat) { +void JKQTPDatastore::saveCSV(QTextStream& txt, QSet userColumns, QString separator, QString decimal_separator, QString comment, QString aroundStrings, char floatformat) { //std::cout< userColumns, QString se if (comment.size()>0) { txt< it(columns); + QMapIterator it(columns); int i=0; while (it.hasNext()) { it.next(); @@ -761,7 +761,7 @@ void JKQTPdatastore::saveCSV(QTextStream& txt, QSet userColumns, QString se size_t rows=getMaxRows(); for (size_t i=0; i it(columns); + QMapIterator it(columns); int j=0; while (it.hasNext()) { it.next(); @@ -784,7 +784,7 @@ void JKQTPdatastore::saveCSV(QTextStream& txt, QSet userColumns, QString se } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastore::saveSYLK(QString filename, QSet userColumns, QString floatformat) { +void JKQTPDatastore::saveSYLK(QString filename, QSet userColumns, QString floatformat) { Q_UNUSED(floatformat) // find out the decimal and the thousand separator QLocale loc=QLocale::c(); @@ -798,7 +798,7 @@ void JKQTPdatastore::saveSYLK(QString filename, QSet userColumns, QString f txt<<"ID;P\n"; // write column headers - QMapIterator it(columns); + QMapIterator it(columns); size_t c=1; int i=0; while (it.hasNext()) { @@ -815,7 +815,7 @@ void JKQTPdatastore::saveSYLK(QString filename, QSet userColumns, QString f size_t rows=getMaxRows(); for (size_t i=0; i it(columns); + QMapIterator it(columns); c=1; while (it.hasNext()) { it.next(); @@ -836,13 +836,13 @@ void JKQTPdatastore::saveSYLK(QString filename, QSet userColumns, QString f } //////////////////////////////////////////////////////////////////////////////////////////////// -QList > JKQTPdatastore::getData(QStringList *columnNames, QSet userColumns) +QList > JKQTPDatastore::getData(QStringList *columnNames, QSet userColumns) { QStringList cl; QList > res; // write column headers - QMapIterator it(columns); + QMapIterator it(columns); size_t c=1; int i=0; while (it.hasNext()) { @@ -867,7 +867,7 @@ QList > JKQTPdatastore::getData(QStringList *columnNames, QSet userColumns, QString floatformat) { +void JKQTPDatastore::saveDIF(QString filename, QSet userColumns, QString floatformat) { Q_UNUSED(floatformat) // find out the decimal and the thousand separator QLocale loc=QLocale::c(); @@ -888,7 +888,7 @@ void JKQTPdatastore::saveDIF(QString filename, QSet userColumns, QString fl txt< it(columns); + QMapIterator it(columns); size_t c=1; int i=0; while (it.hasNext()) { @@ -904,7 +904,7 @@ void JKQTPdatastore::saveDIF(QString filename, QSet userColumns, QString fl for (size_t i=0; i it(columns); + QMapIterator it(columns); c=1; int j=0; while (it.hasNext()) { @@ -926,7 +926,7 @@ void JKQTPdatastore::saveDIF(QString filename, QSet userColumns, QString fl } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreModel::JKQTPdatastoreModel(JKQTPdatastore *datastore, QObject *parent): +JKQTPDatastoreModel::JKQTPDatastoreModel(JKQTPDatastore *datastore, QObject *parent): QAbstractTableModel(parent) { this->datastore=datastore; @@ -934,12 +934,12 @@ JKQTPdatastoreModel::JKQTPdatastoreModel(JKQTPdatastore *datastore, QObject *par } //////////////////////////////////////////////////////////////////////////////////////////////// -JKQTPdatastoreModel::~JKQTPdatastoreModel() +JKQTPDatastoreModel::~JKQTPDatastoreModel() { } //////////////////////////////////////////////////////////////////////////////////////////////// -QVariant JKQTPdatastoreModel::data(const QModelIndex &index, int role) const { +QVariant JKQTPDatastoreModel::data(const QModelIndex &index, int role) const { int row=index.row(); int column=index.column(); if (datastore) { @@ -954,12 +954,12 @@ QVariant JKQTPdatastoreModel::data(const QModelIndex &index, int role) const { } //////////////////////////////////////////////////////////////////////////////////////////////// -Qt::ItemFlags JKQTPdatastoreModel::flags(const QModelIndex &/*index*/) const { +Qt::ItemFlags JKQTPDatastoreModel::flags(const QModelIndex &/*index*/) const { return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } //////////////////////////////////////////////////////////////////////////////////////////////// -QVariant JKQTPdatastoreModel::headerData(int section, Qt::Orientation orientation, int role) const { +QVariant JKQTPDatastoreModel::headerData(int section, Qt::Orientation orientation, int role) const { if (datastore) { if (role==Qt::DisplayRole) { if (orientation==Qt::Horizontal) { @@ -976,7 +976,7 @@ QVariant JKQTPdatastoreModel::headerData(int section, Qt::Orientation orientatio } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastoreModel::rowCount(const QModelIndex &/*parent*/) const { +int JKQTPDatastoreModel::rowCount(const QModelIndex &/*parent*/) const { if (datastore) { return static_cast(datastore->getMaxRows()); } @@ -984,7 +984,7 @@ int JKQTPdatastoreModel::rowCount(const QModelIndex &/*parent*/) const { } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastoreModel::columnCount(const QModelIndex &/*parent*/) const { +int JKQTPDatastoreModel::columnCount(const QModelIndex &/*parent*/) const { if (datastore) { return static_cast(datastore->getColumnCount()); } @@ -992,7 +992,7 @@ int JKQTPdatastoreModel::columnCount(const QModelIndex &/*parent*/) const { } //////////////////////////////////////////////////////////////////////////////////////////////// -void JKQTPdatastoreModel::reloadModel() +void JKQTPDatastoreModel::reloadModel() { #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) beginResetModel(); @@ -1003,6 +1003,6 @@ void JKQTPdatastoreModel::reloadModel() } //////////////////////////////////////////////////////////////////////////////////////////////// -int JKQTPdatastore::getNextHigherIndex(int column, size_t row) const { +int JKQTPDatastore::getNextHigherIndex(int column, size_t row) const { return getNextHigherIndex(static_cast(column), row); } diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h index 1dedb95425..ebda46f3aa 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.h +++ b/lib/jkqtplotter/jkqtpdatastorage.h @@ -45,15 +45,15 @@ #define JKQTPDATASTORAGE_H -class JKQTPcolumn; // forward declaration -class JKQTPdatastoreItem; // foward declaration -class JKQTPdatastoreModel; // forward declaration +class JKQTPColumn; // forward declaration +class JKQTPDatastoreItem; // foward declaration +class JKQTPDatastoreModel; // forward declaration /** \brief the types of data in one JKQTdatastoreItem * \ingroup jkqtpdatastorage * - * \c JKQTPsingleColumn: + * \c JKQTPSingleColumn: * \verbatim +-----+-----+-----+....................+-----+ | 0 | 1 | 2 | + N-1 | @@ -61,7 +61,7 @@ class JKQTPdatastoreModel; // forward declaration \endverbatim * * - * \c JKQTPmatrixColumn: + * \c JKQTPMatrixColumn: * \verbatim ================= COLUMN 1 ================= ================= COLUMN 2 ================= +-----+-----+-----+....................+-----++-----+-----+-----+....................+-----+ ..... @@ -71,7 +71,7 @@ class JKQTPdatastoreModel; // forward declaration \endverbatim * * - * \c JKQTPmatrixRow (C standard representation of matrices): + * \c JKQTPMatrixRow (C standard representation of matrices): * \verbatim ================== ROW 1 ================== ================== ROW 2 ================== +-----+-----+-----+....................+-----++-----+-----+-----+....................+-----+ ..... @@ -80,40 +80,40 @@ class JKQTPdatastoreModel; // forward declaration =C1== =C2== =C3== =CN== =C1== =C2== =C3== =CN== \endverbatim */ -enum JKQTPdatastoreItemFormat { - JKQTPsingleColumn, /*!< \brief a 1D vector of doubles. (default option) */ - JKQTPmatrixColumn, /*!< \brief a 1D vector of double that represents a number of columns. The data is store column after column. */ - JKQTPmatrixRow /*!< \brief a 1D vector of double that represents a number of rows (C standard representation of matrices). The data is stored row after row.*/ +enum JKQTPDatastoreItemFormat { + JKQTPSingleColumn, /*!< \brief a 1D vector of doubles. (default option) */ + JKQTPMatrixColumn, /*!< \brief a 1D vector of double that represents a number of columns. The data is store column after column. */ + JKQTPMatrixRow /*!< \brief a 1D vector of double that represents a number of rows (C standard representation of matrices). The data is stored row after row.*/ }; -/** \brief This class manages chunks of memory that are used for column data in JKQtPlotterBase descendents +/** \brief This class manages chunks of memory that are used for column data in JKQTPLotterBase descendents * \ingroup jkqtpdatastorage * - * This class manages a list if JKQTPdatastoreItem onjects that may each contain a chunk of memory, containig + * This class manages a list if JKQTPDatastoreItem onjects that may each contain a chunk of memory, containig * one or more columns of data. Each item can be accessed with get() by a specific ID which is returned by add(). - * JKQTPcolumn. You may only clear all chunks of memory/items. If you no longer need some of the data, but still want - * to access the rest you will simply have to destroy all JKQTPcolumn that point to the item with their - * JKQTPcolumns:datastoreItem property. + * JKQTPColumn. You may only clear all chunks of memory/items. If you no longer need some of the data, but still want + * to access the rest you will simply have to destroy all JKQTPColumn that point to the item with their + * JKQTPColumns:datastoreItem property. * * \verbatim -+- JKQTPdatastore ---------------------+ std::vector: -| | +- JKQTPcolumn ----------------+ -| +- JKQTPdatastoreItem --------+ | 0 | datastore | -| 0 | JKQTPsingleColumn |<--|-------------------|---datastoreItem = 0 | ++- JKQTPDatastore ---------------------+ std::vector: +| | +- JKQTPColumn ----------------+ +| +- JKQTPDatastoreItem --------+ | 0 | datastore | +| 0 | JKQTPSingleColumn |<--|-------------------|---datastoreItem = 0 | | | 0 # # # # # # # # # # #<--|---|-------------------|---datastoreOffset = 0 | | | | | | | -| +- JKQTPdatastoreItem --------+ | +- JKQTPcolumn ----------------+ -| 1 | JKQTPsingleColumn |<--|---\ 1 | datastore | +| +- JKQTPDatastoreItem --------+ | +- JKQTPColumn ----------------+ +| 1 | JKQTPSingleColumn |<--|---\ 1 | datastore | | | 0 # # # # # # # # # # #<--|---|-\ \--------------|---datastoreItem = 1 | | | | | \----------------|---datastoreOffset = 0 | -| +- JKQTPdatastoreItem --------+ | | | +| +- JKQTPDatastoreItem --------+ | | | | : : | +------------------------------+ | : : | : : | : : | : : -| +- JKQTPdatastoreItem --------+ | : : -|N-1 | JKQTPmatrixRow |<--|---\ : : -| | 0 # # # # # # # # # # # | | \ +- JKQTPcolumn ----------------+ +| +- JKQTPDatastoreItem --------+ | : : +|N-1 | JKQTPMatrixRow |<--|---\ : : +| | 0 # # # # # # # # # # # | | \ +- JKQTPColumn ----------------+ | | 1 # # # # # # # # # # # | | \ M-1 | datastore | | | 2 # # # # # # # # # # #<--|---|--\ \------------|---datastoreItem = N-1 | | | | | \---------------|---datastoreOffset = 2 | @@ -124,48 +124,48 @@ enum JKQTPdatastoreItemFormat { \endverbatim * - * In addition the JKQTPdatastore manages a std::vector which may be used to access the data chunks in the logical + * In addition the JKQTPDatastore manages a std::vector which may be used to access the data chunks in the logical * notion of data columns. This class provides a set of interface methods for this list: * */ -class LIB_EXPORT JKQTPdatastore{ +class LIB_EXPORT JKQTPDatastore{ private: /** \brief a std::vector that contains all items managed by this datastore */ - QMap items; + QMap items; /** \brief a std::vector of all columns that may be used to access the managed chunks of memory. */ - QMap columns; + QMap columns; size_t maxItemID; size_t maxColumnsID; protected: /** \brief add a new column to the datastore and return its ID */ - size_t addColumn(JKQTPcolumn col); + size_t addColumn(JKQTPColumn col); public: /** \brief class constructor, generates an empty datastore */ - JKQTPdatastore(); - /** \brief class destructor, destroys all subordered JKQTPdatastoreItem objects */ - ~JKQTPdatastore() { + JKQTPDatastore(); + /** \brief class destructor, destroys all subordered JKQTPDatastoreItem objects */ + ~JKQTPDatastore() { clear(); } /** \brief deletes all items from the datastore and possibly frees the memory they manage */ void clear(); - /** \brief returns the JKQTPdatastoreItem object for the \a i -th item in the store */ - inline JKQTPdatastoreItem* getItem(size_t i) { + /** \brief returns the JKQTPDatastoreItem object for the \a i -th item in the store */ + inline JKQTPDatastoreItem* getItem(size_t i) { return items.value(i, nullptr); } - /** \brief returns the JKQTPdatastoreItem object for the \a i -th item in the store */ - inline const JKQTPdatastoreItem* getItem(size_t i) const { + /** \brief returns the JKQTPDatastoreItem object for the \a i -th item in the store */ + inline const JKQTPDatastoreItem* getItem(size_t i) const { return items.value(i, nullptr); } /** \brief add a new item to the datastore and return its ID */ - size_t addItem(JKQTPdatastoreItem* item); + size_t addItem(JKQTPDatastoreItem* item); /** \brief add a new columns/item with \a rows rows to the datastore and return its ID. The item uses internal memory management. */ @@ -189,13 +189,13 @@ class LIB_EXPORT JKQTPdatastore{ size_t addInternalItem(double* data, size_t rows); /** \brief add an external memory block to the datastore. It contains \a rows rows and \a columns columns. \a dataformat determined the memory layout*/ - size_t addItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); + size_t addItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); /** \brief add one external column to the datastore. It contains \a rows rows. The data is copied and the copy managed internally */ size_t addCopiedItem(const double *data, size_t rows); /** \brief add one external data block to the datastore. It contains \a rows rows and \a columns columns. The data is copied and the copy managed internally */ - size_t addCopiedItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); + size_t addCopiedItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); @@ -498,12 +498,12 @@ class LIB_EXPORT JKQTPdatastore{ /** \brief return the num of the first column with the given name, if none was found this creates a new column with no rows and returns its num */ size_t ensureColumnNum(const QString& name); - /** \brief returns the JKQTPcolumn object for the \a i -th column in the store */ - JKQTPcolumn getColumn(size_t i) const; + /** \brief returns the JKQTPColumn object for the \a i -th column in the store */ + JKQTPColumn getColumn(size_t i) const; - /** \brief returns the JKQTPcolumn object for the \a i -th column in the store */ - JKQTPcolumn getColumn(int i) const; + /** \brief returns the JKQTPColumn object for the \a i -th column in the store */ + JKQTPColumn getColumn(int i) const; /** \brief returns the maximum number of rows in all columns */ size_t getMaxRows(); @@ -591,12 +591,12 @@ class LIB_EXPORT JKQTPdatastore{ -/** \brief stores information about one data column. See JKQTPdatastore for more information. +/** \brief stores information about one data column. See JKQTPDatastore for more information. * \ingroup jkqtpdatastorage * - * \see JKQTPdatastore + * \see JKQTPDatastore */ -class LIB_EXPORT JKQTPcolumn { +class LIB_EXPORT JKQTPColumn { private: /** \brief index of the item in the datastore that contains the data for this column */ size_t datastoreItem; @@ -605,28 +605,28 @@ class LIB_EXPORT JKQTPcolumn { /** \brief a name describing the column */ QString name; /** \brief pointer to the datastore object used to manage the data of the plot */ - JKQTPdatastore* datastore; + JKQTPDatastore* datastore; bool valid; protected: - inline JKQTPdatastore* get_datastore() { return datastore; } - inline const JKQTPdatastore* get_datastore() const { return datastore; } + inline JKQTPDatastore* get_datastore() { return datastore; } + inline const JKQTPDatastore* get_datastore() const { return datastore; } public: - JKQTPcolumn(); + JKQTPColumn(); /** \brief class constructor that binds the column to a specific datastore object. * * The use of this constructor is mandatory. The default constructor (no arguments) is hidden. Also note * that you cannot change the binding of a column to a datastore object after creation of the column. */ - JKQTPcolumn(JKQTPdatastore* datastore, const QString& name=QString(""), size_t datastoreItem=0, size_t datastoreOffset=0); + JKQTPColumn(JKQTPDatastore* datastore, const QString& name=QString(""), size_t datastoreItem=0, size_t datastoreOffset=0); inline bool isValid() const { return valid; } /** \brief class destructor */ - ~JKQTPcolumn() ; + ~JKQTPColumn() ; - /*! \brief sets the property name to the specified \a __value. \details Description of the parameter name is:
\copybrief JKQTPcolumn::name
\see JKQTPcolumn::name for more information */ + /*! \brief sets the property name to the specified \a __value. \details Description of the parameter name is:
\copybrief JKQTPColumn::name
\see JKQTPColumn::name for more information */ inline void set_name (const QString& __value) { this->name = __value; @@ -692,7 +692,7 @@ class LIB_EXPORT JKQTPcolumn { } /** \brief returns a pointer to the datastore item representing this column */ - inline JKQTPdatastoreItem* getDatastoreItem() const { return datastore->getItem(datastoreItem); } + inline JKQTPDatastoreItem* getDatastoreItem() const { return datastore->getItem(datastoreItem); } /** \brief copy data from the given array into the column * @@ -713,10 +713,10 @@ class LIB_EXPORT JKQTPcolumn { void setAll(double value); - /*! \brief returns the property datastoreItem. \details Description of the parameter datastoreItem is:
\copybrief JKQTPcolumn::datastoreItem
. \see JKQTPcolumn::datastoreItem for more information */ \ + /*! \brief returns the property datastoreItem. \details Description of the parameter datastoreItem is:
\copybrief JKQTPColumn::datastoreItem
. \see JKQTPColumn::datastoreItem for more information */ \ inline size_t get_datastoreItem() const \ { return this->datastoreItem; } - /*! \brief returns the property datastoreOffset. \details Description of the parameter datastoreOffset is:
\copybrief JKQTPcolumn::datastoreOffset
. \see JKQTPcolumn::datastoreOffset for more information */ \ + /*! \brief returns the property datastoreOffset. \details Description of the parameter datastoreOffset is:
\copybrief JKQTPColumn::datastoreOffset
. \see JKQTPColumn::datastoreOffset for more information */ \ inline size_t get_datastoreOffset() const \ { return this->datastoreOffset; } }; @@ -725,12 +725,12 @@ class LIB_EXPORT JKQTPcolumn { /** \brief this represents one chunk of memory which can represent one or more columns of data for JKQTBasePlotter. - * See JKQTPdatastore for more information. + * See JKQTPDatastore for more information. * \ingroup jkqtpdatastorage * * Each chunk of memory is pointed at by a simple double* pointer \c data. the memory layout of the memory layout of * the RAM segment pointed at by \c data is determined by the parameter \c dataformat: - * \copydoc JKQTPdatastoreItemFormat + * \copydoc JKQTPDatastoreItemFormat * * The properties \c columns and \c rows determine how many columns and rows are represented by this item (access via * get_columns() and get_rows() ). This class may manage chunks of "internal" and "external" memory (which is indicated by @@ -741,9 +741,9 @@ class LIB_EXPORT JKQTPcolumn { * * you can use get() and set() to access the memory chunc. * - * \see JKQTPdatastore + * \see JKQTPDatastore */ -class LIB_EXPORT JKQTPdatastoreItem { +class LIB_EXPORT JKQTPDatastoreItem { private: /** \brief a pointer to the actual data */ double* data; @@ -756,27 +756,27 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief number of rows in this item */ size_t rows; /** \brief memory format of the data in this item */ - JKQTPdatastoreItemFormat dataformat; + JKQTPDatastoreItemFormat dataformat; protected: /** \brief hidden default constructor */ - JKQTPdatastoreItem(); + JKQTPDatastoreItem(); public: /** \brief class constructor: initializes the object for internal data storage */ - JKQTPdatastoreItem(size_t columns, size_t rows); + JKQTPDatastoreItem(size_t columns, size_t rows); /** \brief class constructor: initializes the object for external data storage */ - JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); + JKQTPDatastoreItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columns, size_t rows); /** \brief class constructor: initializes the object for external data storage */ - JKQTPdatastoreItem(JKQTPdatastoreItemFormat dataformat, double* data, size_t columns, size_t rows, bool internal); + JKQTPDatastoreItem(JKQTPDatastoreItemFormat dataformat, double* data, size_t columns, size_t rows, bool internal); /** \brief class destructor: frees unfreed internal memory */ - ~JKQTPdatastoreItem(); + ~JKQTPDatastoreItem(); /** \brief change the size of all columns to the givne number of rows. The data will be lost */ void resizeColumns(size_t rows); - /*! \brief returns the property rows. \details Description of the parameter rows is:
\copybrief JKQTPdatastoreItem::JKQTPdatastoreItemrows
. \see JKQTPdatastoreItem::rows for more information */ \ + /*! \brief returns the property rows. \details Description of the parameter rows is:
\copybrief JKQTPDatastoreItem::JKQTPDatastoreItemrows
. \see JKQTPDatastoreItem::rows for more information */ \ inline size_t get_rows() const { return rows; } - /*! \brief returns the property columns. \details Description of the parameter columns is:
\copybrief JKQTPdatastoreItem::columns
. \see JKQTPdatastoreItem::columns for more information */ \ + /*! \brief returns the property columns. \details Description of the parameter columns is:
\copybrief JKQTPDatastoreItem::columns
. \see JKQTPDatastoreItem::columns for more information */ \ inline size_t get_columns() const { return columns; } @@ -784,11 +784,11 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief returns the data at the position (\a column, \a row ). The column index specifies the column inside THIS item, not the global column number. */ inline double get(size_t column, size_t row) { if (data!=nullptr) switch(dataformat) { - case JKQTPsingleColumn: + case JKQTPSingleColumn: return data[row]; - case JKQTPmatrixColumn: + case JKQTPMatrixColumn: return data[column*rows+row]; - case JKQTPmatrixRow: + case JKQTPMatrixRow: return data[row*columns+column]; } return 0; @@ -798,11 +798,11 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief returns the data at the position (\a column, \a row ). The column index specifies the column inside THIS item, not the global column number. */ inline double* getPointer(size_t column, size_t row) { if (data!=nullptr) switch(dataformat) { - case JKQTPsingleColumn: + case JKQTPSingleColumn: return &(data[row]); - case JKQTPmatrixColumn: + case JKQTPMatrixColumn: return &(data[column*rows+row]); - case JKQTPmatrixRow: + case JKQTPMatrixRow: return &(data[row*columns+column]); } return nullptr; @@ -811,11 +811,11 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief returns the data at the position (\a column, \a row ). The column index specifies the column inside THIS item, not the global column number. */ inline const double* getPointer(size_t column, size_t row) const { if (data!=nullptr) switch(dataformat) { - case JKQTPsingleColumn: + case JKQTPSingleColumn: return &(data[row]); - case JKQTPmatrixColumn: + case JKQTPMatrixColumn: return &(data[column*rows+row]); - case JKQTPmatrixRow: + case JKQTPMatrixRow: return &(data[row*columns+column]); } return nullptr; @@ -823,13 +823,13 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief set the data at the position (\a column, \a row ) to \a value. The column index specifies the column inside THIS item, not the global column number. */ inline void set(size_t column, size_t row, double value) { if (data!=nullptr) switch(dataformat) { - case JKQTPsingleColumn: + case JKQTPSingleColumn: data[row]=value; return; - case JKQTPmatrixColumn: + case JKQTPMatrixColumn: data[column*rows+row]=value; return; - case JKQTPmatrixRow: + case JKQTPMatrixRow: data[row*columns+column]=value; return; } @@ -837,16 +837,16 @@ class LIB_EXPORT JKQTPdatastoreItem { }; -/** \brief QAbstractTableModel descendent that allows to view data in a JKQTPdatastore +/** \brief QAbstractTableModel descendent that allows to view data in a JKQTPDatastore * \ingroup jkqtpdatastorage * - * \see JKQTPdatastore + * \see JKQTPDatastore */ -class LIB_EXPORT JKQTPdatastoreModel: public QAbstractTableModel { +class LIB_EXPORT JKQTPDatastoreModel: public QAbstractTableModel { Q_OBJECT public: - JKQTPdatastoreModel(JKQTPdatastore* datastore, QObject* parent=nullptr); - virtual ~JKQTPdatastoreModel() override; + JKQTPDatastoreModel(JKQTPDatastore* datastore, QObject* parent=nullptr); + virtual ~JKQTPDatastoreModel() override; virtual QVariant data(const QModelIndex &index, int role) const override; @@ -859,7 +859,7 @@ class LIB_EXPORT JKQTPdatastoreModel: public QAbstractTableModel { void reloadModel(); protected: - JKQTPdatastore* datastore; + JKQTPDatastore* datastore; }; @@ -868,28 +868,28 @@ class LIB_EXPORT JKQTPdatastoreModel: public QAbstractTableModel { //////////////////////////////////////////////////////////////////////////////////////////////// -inline void JKQTPcolumn::setValue(size_t n, double val){ +inline void JKQTPColumn::setValue(size_t n, double val){ if (!datastore) return ; if (!datastore->getItem(datastoreItem)) return ; datastore->getItem(datastoreItem)->set(datastoreOffset, n, val); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline void JKQTPcolumn::incValue(size_t n, double increment){ +inline void JKQTPColumn::incValue(size_t n, double increment){ if (!datastore) return ; if (!datastore->getItem(datastoreItem)) return ; datastore->getItem(datastoreItem)->set(datastoreOffset, n, datastore->getItem(datastoreItem)->get(datastoreOffset, n)+increment); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline double JKQTPcolumn::getValue(size_t n) const { +inline double JKQTPColumn::getValue(size_t n) const { if (!datastore) return 0; if (!datastore->getItem(datastoreItem)) return 0; return datastore->getItem(datastoreItem)->get(datastoreOffset, n); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline double JKQTPcolumn::getValue(int n) const { +inline double JKQTPColumn::getValue(int n) const { if (!datastore) return 0; if (!datastore->getItem(datastoreItem)) return 0; if (n<0) return 0; @@ -897,22 +897,22 @@ inline double JKQTPcolumn::getValue(int n) const { } //////////////////////////////////////////////////////////////////////////////////////////////// -inline double JKQTPdatastore::get(size_t column, size_t row) const { +inline double JKQTPDatastore::get(size_t column, size_t row) const { return columns[column].getValue(row); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline double JKQTPdatastore::get(int column, size_t row) const { +inline double JKQTPDatastore::get(int column, size_t row) const { return get(static_cast(column), static_cast(row)); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline void JKQTPdatastore::set(size_t column, size_t row, double value) { +inline void JKQTPDatastore::set(size_t column, size_t row, double value) { columns[column].setValue(row, value); } //////////////////////////////////////////////////////////////////////////////////////////////// -inline void JKQTPdatastore::set(int column, size_t row, double value) { +inline void JKQTPDatastore::set(int column, size_t row, double value) { set(static_cast(column), static_cast(row), value); } diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.cpp b/lib/jkqtplotter/jkqtpelementsoverlay.cpp index 6e02537652..ce6f6e60f6 100644 --- a/lib/jkqtplotter/jkqtpelementsoverlay.cpp +++ b/lib/jkqtplotter/jkqtpelementsoverlay.cpp @@ -26,7 +26,7 @@ #include -JKQTPoverlayElement::JKQTPoverlayElement(JKQtBasePlotter *parent) : +JKQTPOverlayElement::JKQTPOverlayElement(JKQTBasePlotter *parent) : QObject(parent) { color=QColor("red"); @@ -40,30 +40,30 @@ JKQTPoverlayElement::JKQTPoverlayElement(JKQtBasePlotter *parent) : visible=true; } -void JKQTPoverlayElement::setParent(JKQtBasePlotter *parent) { +void JKQTPOverlayElement::setParent(JKQTBasePlotter *parent) { this->parent=parent; QObject::setParent(parent); } -QPointF JKQTPoverlayElement::transform(const QPointF &x) { +QPointF JKQTPOverlayElement::transform(const QPointF &x) { return QPointF(parent->x2p(x.x()), parent->y2p(x.y())); } -double JKQTPoverlayElement::transfromX(double x) +double JKQTPOverlayElement::transfromX(double x) { return parent->x2p(x); } -double JKQTPoverlayElement::transfromY(double y) +double JKQTPOverlayElement::transfromY(double y) { return parent->y2p(y); } -QPointF JKQTPoverlayElement::backTransform(const QPointF &x) { +QPointF JKQTPOverlayElement::backTransform(const QPointF &x) { return QPointF(parent->p2x(x.x()), parent->p2y(x.y())); } -QVector JKQTPoverlayElement::transform(const QVector &x) { +QVector JKQTPOverlayElement::transform(const QVector &x) { QVector res; for (int i=0; i JKQTPoverlayElement::transform(const QVector &x) { return res; } -QPainterPath JKQTPoverlayElement::transformToLinePath(const QVector &x) { +QPainterPath JKQTPOverlayElement::transformToLinePath(const QVector &x) { QPainterPath res; if (x.size()>0) { res.moveTo(transform(x[0])); @@ -82,14 +82,14 @@ QPainterPath JKQTPoverlayElement::transformToLinePath(const QVector &x) return res; } -QBrush JKQTPoverlayElement::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPOverlayElement::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPoverlayElement::getPen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPOverlayElement::getPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth))); @@ -97,7 +97,7 @@ QPen JKQTPoverlayElement::getPen(JKQTPEnhancedPainter& painter) const { return p; } -QFont JKQTPoverlayElement::getFont() const { +QFont JKQTPOverlayElement::getFont() const { QFont f; f.setFamily(fontName); f.setPointSizeF(fontSize); @@ -106,8 +106,8 @@ QFont JKQTPoverlayElement::getFont() const { -JKQTPoverlayOneCoordOverlay::JKQTPoverlayOneCoordOverlay(double pos, JKQtBasePlotter *parent): - JKQTPoverlayElement(parent) +JKQTPOverlayOneCoordOverlay::JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent): + JKQTPOverlayElement(parent) { this->position=pos; } @@ -116,20 +116,20 @@ JKQTPoverlayOneCoordOverlay::JKQTPoverlayOneCoordOverlay(double pos, JKQtBasePlo -JKQTPoverlayVerticalLine::JKQTPoverlayVerticalLine(double pos, JKQtBasePlotter *parent): - JKQTPoverlayOneCoordOverlay(pos, parent) +JKQTPOverlayVerticalLine::JKQTPOverlayVerticalLine(double pos, JKQTBasePlotter *parent): + JKQTPOverlayOneCoordOverlay(pos, parent) { } -JKQTPoverlayVerticalLine::JKQTPoverlayVerticalLine(double pos, QString text, JKQtBasePlotter *parent): - JKQTPoverlayOneCoordOverlay(pos, parent) +JKQTPOverlayVerticalLine::JKQTPOverlayVerticalLine(double pos, QString text, JKQTBasePlotter *parent): + JKQTPOverlayOneCoordOverlay(pos, parent) { set_text(text); } -void JKQTPoverlayVerticalLine::draw(JKQTPEnhancedPainter &painter) { +void JKQTPOverlayVerticalLine::draw(JKQTPEnhancedPainter &painter) { if (!parent) return; double ymin=parent->getYMin(); double ymax=parent->getYMax(); @@ -142,8 +142,8 @@ void JKQTPoverlayVerticalLine::draw(JKQTPEnhancedPainter &painter) { if (!text.isEmpty()) { - //JKQTmathText mt(this); - JKQTmathText* mt=parent->get_mathText(); + //JKQTMathText mt(this); + JKQTMathText* mt=parent->get_mathText(); mt->set_fontSize(fontSize); mt->set_fontColor(color); #ifdef USE_XITS_FONTS @@ -156,28 +156,28 @@ void JKQTPoverlayVerticalLine::draw(JKQTPEnhancedPainter &painter) { painter.restore(); } -JKQTPoverlayTwoCoordOverlay::JKQTPoverlayTwoCoordOverlay(double pos, double pos2, JKQtBasePlotter *parent): - JKQTPoverlayOneCoordOverlay(pos, parent) +JKQTPOverlayTwoCoordOverlay::JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent): + JKQTPOverlayOneCoordOverlay(pos, parent) { position2=pos2; } -JKQTPoverlayVerticalRange::JKQTPoverlayVerticalRange(double pos, double pos2, JKQtBasePlotter *parent): - JKQTPoverlayTwoCoordOverlay(pos, pos2, parent) +JKQTPOverlayVerticalRange::JKQTPOverlayVerticalRange(double pos, double pos2, JKQTBasePlotter *parent): + JKQTPOverlayTwoCoordOverlay(pos, pos2, parent) { fillColor=QColor(Qt::transparent); inverted=false; } -JKQTPoverlayVerticalRange::JKQTPoverlayVerticalRange(double pos, double pos2, QString text, JKQtBasePlotter *parent): - JKQTPoverlayTwoCoordOverlay(pos, pos2, parent) +JKQTPOverlayVerticalRange::JKQTPOverlayVerticalRange(double pos, double pos2, QString text, JKQTBasePlotter *parent): + JKQTPOverlayTwoCoordOverlay(pos, pos2, parent) { set_text(text); fillColor=QColor(Qt::transparent); inverted=false; } -void JKQTPoverlayVerticalRange::draw(JKQTPEnhancedPainter &painter) { +void JKQTPOverlayVerticalRange::draw(JKQTPEnhancedPainter &painter) { if (!parent) return; double ymin=parent->getYMin(); double ymax=parent->getYMax(); @@ -204,8 +204,8 @@ void JKQTPoverlayVerticalRange::draw(JKQTPEnhancedPainter &painter) { painter.drawLine(p21, p22); if (!text.isEmpty()) { - //JKQTmathText mt(this); - JKQTmathText* mt=parent->get_mathText(); + //JKQTMathText mt(this); + JKQTMathText* mt=parent->get_mathText(); mt->set_fontSize(fontSize); mt->set_fontColor(color); #ifdef USE_XITS_FONTS @@ -218,8 +218,8 @@ void JKQTPoverlayVerticalRange::draw(JKQTPEnhancedPainter &painter) { painter.restore(); } -JKQTPoverlayTwoPositionOverlay::JKQTPoverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent): - JKQTPoverlayElement(parent) +JKQTPOverlayTwoPositionOverlay::JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent): + JKQTPOverlayElement(parent) { this->x1=x1; this->y1=y1; @@ -236,14 +236,14 @@ JKQTPoverlayTwoPositionOverlay::JKQTPoverlayTwoPositionOverlay(double x1, double -JKQTPoverlayLine::JKQTPoverlayLine(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent): - JKQTPoverlayTwoPositionOverlay(x1,y1,x2,y2,parent) +JKQTPOverlayLine::JKQTPOverlayLine(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent): + JKQTPOverlayTwoPositionOverlay(x1,y1,x2,y2,parent) { infinite=false; } -void JKQTPoverlayLine::draw(JKQTPEnhancedPainter &painter) { +void JKQTPOverlayLine::draw(JKQTPEnhancedPainter &painter) { if (!parent) return; double xmin=parent->getXMin(); double xmax=parent->getXMax(); @@ -274,13 +274,13 @@ void JKQTPoverlayLine::draw(JKQTPEnhancedPainter &painter) { } -JKQTPoverlayRectangle::JKQTPoverlayRectangle(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent): - JKQTPoverlayTwoPositionOverlay(x1,y1,x2,y2,parent) +JKQTPOverlayRectangle::JKQTPOverlayRectangle(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent): + JKQTPOverlayTwoPositionOverlay(x1,y1,x2,y2,parent) { } -void JKQTPoverlayRectangle::draw(JKQTPEnhancedPainter &painter) +void JKQTPOverlayRectangle::draw(JKQTPEnhancedPainter &painter) { if (!parent) return; QPointF p1=transform(x1, y1); diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.h b/lib/jkqtplotter/jkqtpelementsoverlay.h index 3e08c54bbd..9ba642e127 100644 --- a/lib/jkqtplotter/jkqtpelementsoverlay.h +++ b/lib/jkqtplotter/jkqtpelementsoverlay.h @@ -33,7 +33,7 @@ #define jkqtpelementsoverlay_H // forward declarations -class JKQtBasePlotter; +class JKQTBasePlotter; /*! \brief this virtual base class describes an interface for graph overlay elements, which are simple geometric forms drawn ONTO the graphe, so a redraw of the overlays does NOT require a redraw of the graph. @@ -41,19 +41,19 @@ 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 LIB_EXPORT JKQTPOverlayElement : public QObject { Q_OBJECT public: - explicit JKQTPoverlayElement(JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayElement(JKQTBasePlotter *parent = 0); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter)=0; /** \brief returns the parent painter class */ - inline JKQtBasePlotter* getParent() { return parent; } + inline JKQTBasePlotter* getParent() { return parent; } /** \brief sets the parent painter class */ - virtual void setParent(JKQtBasePlotter* parent); + virtual void setParent(JKQTBasePlotter* parent); /*! \brief sets the property color to the specified \a __value. \details Description of the parameter color is:
\copybrief color
@@ -184,7 +184,7 @@ class LIB_EXPORT JKQTPoverlayElement : public QObject { protected: /** \brief the plotter object this object belongs to */ - JKQtBasePlotter* parent; + JKQTBasePlotter* parent; QColor color; QColor fillColor; @@ -238,10 +238,10 @@ class LIB_EXPORT JKQTPoverlayElement : public QObject { /*! \brief baseclass for a two-position overlay \ingroup jkqtplotter_overlays */ -class LIB_EXPORT JKQTPoverlayTwoPositionOverlay : public JKQTPoverlayElement { +class LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement { Q_OBJECT public: - explicit JKQTPoverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0); /*! \brief sets the property x1 to the specified \a __value. \details Description of the parameter x1 is:
\copybrief x1
@@ -311,10 +311,10 @@ 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 LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement { Q_OBJECT public: - explicit JKQTPoverlayOneCoordOverlay(double pos, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent = 0); /*! \brief sets the property position to the specified \a __value. \details Description of the parameter position is:
\copybrief position
@@ -339,10 +339,10 @@ 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 LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay { Q_OBJECT public: - explicit JKQTPoverlayTwoCoordOverlay(double pos, double pos2, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent = 0); /*! \brief sets the property position2 to the specified \a __value. \details Description of the parameter position2 is:
\copybrief position2
@@ -370,11 +370,11 @@ 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 LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay { Q_OBJECT public: - explicit JKQTPoverlayVerticalLine(double pos, JKQtBasePlotter *parent = 0); - explicit JKQTPoverlayVerticalLine(double pos, QString text, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayVerticalLine(double pos, JKQTBasePlotter *parent = 0); + explicit JKQTPOverlayVerticalLine(double pos, QString text, JKQTBasePlotter *parent = 0); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); @@ -387,11 +387,11 @@ 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 LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay { Q_OBJECT public: - explicit JKQTPoverlayVerticalRange(double pos, double pos2, JKQtBasePlotter *parent = 0); - explicit JKQTPoverlayVerticalRange(double pos, double pos2, QString text, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayVerticalRange(double pos, double pos2, JKQTBasePlotter *parent = 0); + explicit JKQTPOverlayVerticalRange(double pos, double pos2, QString text, JKQTBasePlotter *parent = 0); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); @@ -419,10 +419,10 @@ class LIB_EXPORT JKQTPoverlayVerticalRange : public JKQTPoverlayTwoCoordOverlay \ingroup jkqtplotter_overlays */ -class LIB_EXPORT JKQTPoverlayLine : public JKQTPoverlayTwoPositionOverlay { +class LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay { Q_OBJECT public: - explicit JKQTPoverlayLine(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayLine(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); @@ -450,10 +450,10 @@ class LIB_EXPORT JKQTPoverlayLine : public JKQTPoverlayTwoPositionOverlay { \ingroup jkqtplotter_overlays */ -class LIB_EXPORT JKQTPoverlayRectangle : public JKQTPoverlayTwoPositionOverlay { +class LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay { Q_OBJECT public: - explicit JKQTPoverlayRectangle(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent = 0); + explicit JKQTPOverlayRectangle(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); diff --git a/lib/jkqtplotter/jkqtpgraphs.cpp b/lib/jkqtplotter/jkqtpgraphs.cpp index 165f6f7a98..bd8fce2ecf 100644 --- a/lib/jkqtplotter/jkqtpgraphs.cpp +++ b/lib/jkqtplotter/jkqtpgraphs.cpp @@ -41,10 +41,10 @@ -JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtPlotter* parent): - JKQTPxyGraph(parent) +JKQTPXYLineGraph::JKQTPXYLineGraph(JKQTPLotter* parent): + JKQTPXYGraph(parent) { - sortData=JKQTPxyGraph::Unsorted; + sortData=JKQTPXYGraph::Unsorted; drawSelectionLine=false; selectionLineColor=Qt::transparent; color=QColor("red"); @@ -53,7 +53,7 @@ JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtPlotter* parent): parentPlotStyle=-1; symbolSize=12; symbolWidth=1; - symbol=JKQTPnoSymbol; + symbol=JKQTPNoSymbol; drawLine=true; if (parent) { // get style settings from parent object @@ -65,10 +65,10 @@ JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtPlotter* parent): fillColor=color; } -JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtBasePlotter* parent): - JKQTPxyGraph(parent) +JKQTPXYLineGraph::JKQTPXYLineGraph(JKQTBasePlotter* parent): + JKQTPXYGraph(parent) { - sortData=JKQTPxyGraph::Unsorted; + sortData=JKQTPXYGraph::Unsorted; drawSelectionLine=false; selectionLineColor=Qt::transparent; color=QColor("red"); @@ -77,7 +77,7 @@ JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtBasePlotter* parent): parentPlotStyle=-1; symbolSize=12; symbolWidth=1; - symbol=JKQTPnoSymbol; + symbol=JKQTPNoSymbol; drawLine=true; if (parent) { // get style settings from parent object @@ -89,21 +89,21 @@ JKQTPxyLineGraph::JKQTPxyLineGraph(JKQtBasePlotter* parent): fillColor=color; } -void JKQTPxyLineGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPxyLineGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPXYLineGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; - //qDebug()<<"JKQTPxyLineGraph::draw();"; + //qDebug()<<"JKQTPXYLineGraph::draw();"; drawErrorsBefore(painter); - //qDebug()<<"JKQTPxyLineGraph::draw(): "<<1; + //qDebug()<<"JKQTPXYLineGraph::draw(): "<<1; painter.save(); - //qDebug()<<"JKQTPxyLineGraph::draw(): "<<2; + //qDebug()<<"JKQTPXYLineGraph::draw(): "<<2; QPen p=painter.pen(); p.setColor(color); @@ -138,7 +138,7 @@ void JKQTPxyLineGraph::draw(JKQTPEnhancedPainter& painter) { if (imin<0) imin=0; if (imax<0) imax=0; - //qDebug()<<"JKQTPxyLineGraph::draw(): "<<3<<" imin="<pt2px(painter, symbolSize*1.5), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), penSelection.color(), penSelection.color()); + if (drawSelectionLine && symbol!=JKQTPNoSymbol) { + JKQTPPlotSymbol(painter, x, y, JKQTPFilledCircle, parent->pt2px(painter, symbolSize*1.5), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), penSelection.color(), penSelection.color()); } - JKQTPplotSymbol(painter, x, y, symbol, parent->pt2px(painter, symbolSize), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), symbColor, symbFillColor); + JKQTPPlotSymbol(painter, x, y, symbol, parent->pt2px(painter, symbolSize), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), symbColor, symbFillColor); /*if (drawLine && first) { double xl1=xold; double yl1=yold; @@ -176,8 +176,8 @@ void JKQTPxyLineGraph::draw(JKQTPEnhancedPainter& painter) { // first=true; } } - //qDebug()<<"JKQTPxyLineGraph::draw(): "<<4<<" lines="<pt2px(painter, this->symbolSize); @@ -213,26 +213,26 @@ void JKQTPxyLineGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect painter.setPen(p); int y=rect.top()+rect.height()/2.0; if (drawLine) painter.drawLine(rect.left(), y, rect.right(), y); - JKQTPplotSymbol(painter, rect.left()+rect.width()/2.0, rect.top()+rect.height()/2.0, symbol, symbolSize, symbolWidth, getKeyLabelColor(), fillColor); + JKQTPPlotSymbol(painter, rect.left()+rect.width()/2.0, rect.top()+rect.height()/2.0, symbol, symbolSize, symbolWidth, getKeyLabelColor(), fillColor); painter.restore(); } -QColor JKQTPxyLineGraph::getKeyLabelColor() { +QColor JKQTPXYLineGraph::getKeyLabelColor() { return color; } -JKQTPxyLineErrorGraph::JKQTPxyLineErrorGraph(JKQtBasePlotter *parent): - JKQTPxyLineGraph(parent), JKQTPxyGraphErrors() +JKQTPXYLineErrorGraph::JKQTPXYLineErrorGraph(JKQTBasePlotter *parent): + JKQTPXYLineGraph(parent), JKQTPXYGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPxyLineErrorGraph::JKQTPxyLineErrorGraph(JKQtPlotter *parent): - JKQTPxyLineGraph(parent), JKQTPxyGraphErrors() +JKQTPXYLineErrorGraph::JKQTPXYLineErrorGraph(JKQTPLotter *parent): + JKQTPXYLineGraph(parent), JKQTPXYGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPxyLineErrorGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { - if (xErrorColumn<0 || xErrorStyle==JKQTPnoError) { - return JKQTPxyLineGraph::getXMinMax(minx, maxx, smallestGreaterZero); +bool JKQTPXYLineErrorGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { + if (xErrorColumn<0 || xErrorStyle==JKQTPNoError) { + return JKQTPXYLineGraph::getXMinMax(minx, maxx, smallestGreaterZero); } else { bool start=true; minx=0; @@ -241,7 +241,7 @@ bool JKQTPxyLineErrorGraph::getXMinMax(double &minx, double &maxx, double &small if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -278,9 +278,9 @@ bool JKQTPxyLineErrorGraph::getXMinMax(double &minx, double &maxx, double &small } } -bool JKQTPxyLineErrorGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { - if (yErrorColumn<0 || yErrorStyle==JKQTPnoError) { - return JKQTPxyLineGraph::getYMinMax(miny, maxy, smallestGreaterZero); +bool JKQTPXYLineErrorGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { + if (yErrorColumn<0 || yErrorStyle==JKQTPNoError) { + return JKQTPXYLineGraph::getYMinMax(miny, maxy, smallestGreaterZero); } else { bool start=true; miny=0; @@ -289,7 +289,7 @@ bool JKQTPxyLineErrorGraph::getYMinMax(double &miny, double &maxy, double &small if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -326,15 +326,15 @@ bool JKQTPxyLineErrorGraph::getYMinMax(double &miny, double &maxy, double &small } } -bool JKQTPxyLineErrorGraph::usesColumn(int c) const +bool JKQTPXYLineErrorGraph::usesColumn(int c) const { - return JKQTPxyLineGraph::usesColumn(c)||JKQTPxyGraphErrors::errorUsesColumn(c); + return JKQTPXYLineGraph::usesColumn(c)||JKQTPXYGraphErrors::errorUsesColumn(c); } -void JKQTPxyLineErrorGraph::drawErrorsBefore(JKQTPEnhancedPainter &painter) +void JKQTPXYLineErrorGraph::drawErrorsBefore(JKQTPEnhancedPainter &painter) { intSortData(); - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } @@ -352,8 +352,8 @@ void JKQTPxyLineErrorGraph::drawErrorsBefore(JKQTPEnhancedPainter &painter) -JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtBasePlotter* parent): - JKQTPxyGraph(parent) +JKQTPStepHorizontalGraph::JKQTPStepHorizontalGraph(JKQTBasePlotter* parent): + JKQTPXYGraph(parent) { color=QColor("red"); fillColor=color.lighter(); @@ -362,7 +362,7 @@ JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtBasePlotter* parent): fillStyle=Qt::SolidPattern; drawLine=true; fillCurve=true; - stepType=JKQTPstepLeft; + stepType=JKQTPStepLeft; if (parent) { // get style settings from parent object @@ -375,8 +375,8 @@ JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtBasePlotter* parent): } -JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtPlotter* parent): - JKQTPxyGraph(parent) +JKQTPStepHorizontalGraph::JKQTPStepHorizontalGraph(JKQTPLotter* parent): + JKQTPXYGraph(parent) { color=QColor("red"); fillColor=color.lighter(); @@ -385,7 +385,7 @@ JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtPlotter* parent): fillStyle=Qt::SolidPattern; drawLine=true; fillCurve=true; - stepType=JKQTPstepLeft; + stepType=JKQTPStepLeft; if (parent) { // get style settings from parent object @@ -398,7 +398,7 @@ JKQTPstepHorizontalGraph::JKQTPstepHorizontalGraph(JKQtPlotter* parent): } -void JKQTPstepHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPStepHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); QPen np(Qt::NoPen); @@ -418,17 +418,17 @@ void JKQTPstepHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRec painter.restore(); } -QColor JKQTPstepHorizontalGraph::getKeyLabelColor() { +QColor JKQTPStepHorizontalGraph::getKeyLabelColor() { return color; } -void JKQTPstepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPStepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPstepHorizontalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPStepHorizontalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -490,7 +490,7 @@ void JKQTPstepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { //double xl2=x; //double yl2=y; - if (stepType==JKQTPstepCenter) { + if (stepType==JKQTPStepCenter) { double d=(x-xold); pf.lineTo(xold+d/2.0, yold); pf.lineTo(xold+d/2.0, y); @@ -500,14 +500,14 @@ void JKQTPstepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { pl.lineTo(xold+d/2.0, y); pl.lineTo(x, y); } - } else if (stepType==JKQTPstepLeft) { + } else if (stepType==JKQTPStepLeft) { pf.lineTo(xold, y); pf.lineTo(x, y); if (drawLine) { pl.lineTo(xold, y); pl.lineTo(x, y); } - } else if (stepType==JKQTPstepRight) { + } else if (stepType==JKQTPStepRight) { pf.lineTo(x, yold); pf.lineTo(x, y); if (drawLine) { @@ -559,23 +559,23 @@ void JKQTPstepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { -JKQTPstepVerticalGraph::JKQTPstepVerticalGraph(JKQtBasePlotter *parent): - JKQTPstepHorizontalGraph(parent) +JKQTPStepVerticalGraph::JKQTPStepVerticalGraph(JKQTBasePlotter *parent): + JKQTPStepHorizontalGraph(parent) { } -JKQTPstepVerticalGraph::JKQTPstepVerticalGraph(JKQtPlotter *parent): - JKQTPstepHorizontalGraph(parent) +JKQTPStepVerticalGraph::JKQTPStepVerticalGraph(JKQTPLotter *parent): + JKQTPStepHorizontalGraph(parent) { } -void JKQTPstepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPStepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPstepVerticalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPStepVerticalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -633,7 +633,7 @@ void JKQTPstepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { //double xl2=x; //double yl2=y; - if (stepType==JKQTPstepCenter) { + if (stepType==JKQTPStepCenter) { double d=(y-yold); pf.lineTo(xold, yold+d/2.0); pf.lineTo(x, yold+d/2.0); @@ -643,14 +643,14 @@ void JKQTPstepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { pl.lineTo(x, yold+d/2.0); pl.lineTo(x, y); } - } else if (stepType==JKQTPstepLeft) { + } else if (stepType==JKQTPStepLeft) { pf.lineTo(x, yold); pf.lineTo(x, y); if (drawLine) { pl.lineTo(x, yold); pl.lineTo(x, y); } - } else if (stepType==JKQTPstepRight) { + } else if (stepType==JKQTPStepRight) { pf.lineTo(xold, y); pf.lineTo(x, y); if (drawLine) { @@ -699,8 +699,8 @@ void JKQTPstepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { -JKQTPhorizontalRange::JKQTPhorizontalRange(JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPHorizontalRange::JKQTPHorizontalRange(JKQTBasePlotter* parent): + JKQTPGraph(parent) { color=QColor("red").darker(); fillColor=QColor("red").lighter(); @@ -735,8 +735,8 @@ JKQTPhorizontalRange::JKQTPhorizontalRange(JKQtBasePlotter* parent): } -JKQTPhorizontalRange::JKQTPhorizontalRange(JKQtPlotter* parent): - JKQTPgraph(parent) +JKQTPHorizontalRange::JKQTPHorizontalRange(JKQTPLotter* parent): + JKQTPGraph(parent) { color=QColor("red").darker(); fillColor=QColor("red").lighter(); @@ -769,9 +769,9 @@ JKQTPhorizontalRange::JKQTPhorizontalRange(JKQtPlotter* parent): plotRangeLines=true; fillRange=true; } -void JKQTPhorizontalRange::draw(JKQTPEnhancedPainter& painter) { +void JKQTPHorizontalRange::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPhorizontalRange::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPHorizontalRange::draw"); #endif double c=transformY(rangeCenter); double cmi=transformY(rangeMin); @@ -835,7 +835,7 @@ void JKQTPhorizontalRange::draw(JKQTPEnhancedPainter& painter) { painter.restore(); } -void JKQTPhorizontalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPHorizontalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); QPen np(Qt::NoPen); @@ -869,13 +869,13 @@ void JKQTPhorizontalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& painter.restore(); } -bool JKQTPhorizontalRange::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) +bool JKQTPHorizontalRange::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { smallestGreaterZero=minx=maxx=0; return false; } -bool JKQTPhorizontalRange::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) +bool JKQTPHorizontalRange::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { miny=rangeMin; maxy=rangeMax; @@ -884,12 +884,12 @@ bool JKQTPhorizontalRange::getYMinMax(double &miny, double &maxy, double &smalle return true; } -QColor JKQTPhorizontalRange::getKeyLabelColor() +QColor JKQTPHorizontalRange::getKeyLabelColor() { return color; } -void JKQTPhorizontalRange::setDrawCenterLineOnly() +void JKQTPHorizontalRange::setDrawCenterLineOnly() { plotCenterLine=true; plotRange=false; @@ -904,19 +904,19 @@ void JKQTPhorizontalRange::setDrawCenterLineOnly() -JKQTPverticalRange::JKQTPverticalRange(JKQtBasePlotter* parent): - JKQTPhorizontalRange(parent) +JKQTPVerticalRange::JKQTPVerticalRange(JKQTBasePlotter* parent): + JKQTPHorizontalRange(parent) { } -JKQTPverticalRange::JKQTPverticalRange(JKQtPlotter* parent): - JKQTPhorizontalRange(parent) +JKQTPVerticalRange::JKQTPVerticalRange(JKQTPLotter* parent): + JKQTPHorizontalRange(parent) { } -void JKQTPverticalRange::draw(JKQTPEnhancedPainter& painter) { +void JKQTPVerticalRange::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPverticalRange::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPVerticalRange::draw"); #endif double c=transformX(rangeCenter); double cmi=transformX(rangeMin); @@ -974,7 +974,7 @@ void JKQTPverticalRange::draw(JKQTPEnhancedPainter& painter) { painter.restore(); } -void JKQTPverticalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPVerticalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); QPen np(Qt::NoPen); @@ -1007,7 +1007,7 @@ void JKQTPverticalRange::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& re painter.restore(); } -bool JKQTPverticalRange::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) +bool JKQTPVerticalRange::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { minx=rangeMin; maxx=rangeMax; @@ -1016,14 +1016,14 @@ bool JKQTPverticalRange::getXMinMax(double &minx, double &maxx, double &smallest return true; } -bool JKQTPverticalRange::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) +bool JKQTPVerticalRange::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { smallestGreaterZero=miny=maxy=0; return false; } -QPen JKQTPxyLineGraph::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPXYLineGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -1033,7 +1033,7 @@ QPen JKQTPxyLineGraph::getLinePen(JKQTPEnhancedPainter& painter) const { return p; } -QPen JKQTPxyLineGraph::getSymbolPen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPXYLineGraph::getSymbolPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*symbolWidth))); @@ -1043,21 +1043,21 @@ QPen JKQTPxyLineGraph::getSymbolPen(JKQTPEnhancedPainter& painter) const { return p; } -QBrush JKQTPxyLineGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPXYLineGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); return b; } -QBrush JKQTPstepHorizontalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPStepHorizontalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPstepHorizontalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPStepHorizontalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -1068,14 +1068,14 @@ QPen JKQTPstepHorizontalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { return p; } -QBrush JKQTPhorizontalRange::getBrush(JKQTPEnhancedPainter& /*painter*/ ) const { +QBrush JKQTPHorizontalRange::getBrush(JKQTPEnhancedPainter& /*painter*/ ) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPhorizontalRange::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPHorizontalRange::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -1086,8 +1086,8 @@ QPen JKQTPhorizontalRange::getLinePen(JKQTPEnhancedPainter& painter) const { } -JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtBasePlotter *parent): - JKQTPxyLineGraph(parent), +JKQTPXYParametrizedScatterGraph::JKQTPXYParametrizedScatterGraph(JKQTBasePlotter *parent): + JKQTPXYLineGraph(parent), JKQTPColorPaletteTools(parent) { sizeColumn=-1; @@ -1096,7 +1096,7 @@ JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtBasePlotter linewidthColumn=-1; palette=JKQTPMathImageMATLAB; colorColumnContainsRGB=false; - symbol=JKQTPfilledCircle; + symbol=JKQTPFilledCircle; drawLine=false; gridModeForSymbolSize=false; @@ -1105,8 +1105,8 @@ JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtBasePlotter gridSymbolFractionSize=0.9; } -JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtPlotter *parent): - JKQTPxyLineGraph(parent), +JKQTPXYParametrizedScatterGraph::JKQTPXYParametrizedScatterGraph(JKQTPLotter *parent): + JKQTPXYLineGraph(parent), JKQTPColorPaletteTools(parent->get_plotter()) { sizeColumn=-1; @@ -1115,7 +1115,7 @@ JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtPlotter *pa linewidthColumn=-1; palette=JKQTPMathImageMATLAB; colorColumnContainsRGB=false; - symbol=JKQTPfilledCircle; + symbol=JKQTPFilledCircle; drawLine=false; gridModeForSymbolSize=false; @@ -1124,13 +1124,13 @@ JKQTPxyParametrizedScatterGraph::JKQTPxyParametrizedScatterGraph(JKQtPlotter *pa gridSymbolFractionSize=0.9; } -void JKQTPxyParametrizedScatterGraph::draw(JKQTPEnhancedPainter &painter) +void JKQTPXYParametrizedScatterGraph::draw(JKQTPEnhancedPainter &painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPxyParametrizedScatterGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPXYParametrizedScatterGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; cbGetDataMinMax(intColMin, intColMax); @@ -1173,7 +1173,7 @@ void JKQTPxyParametrizedScatterGraph::draw(JKQTPEnhancedPainter &painter) if (imin<0) imin=0; if (imax<0) imax=0; - //qDebug()<<"JKQTPxyLineGraph::draw(): "<<3<<" imin="<getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -193,7 +193,7 @@ void JKQTPbarVerticalGraph::draw(JKQTPEnhancedPainter& painter) { drawErrorsAfter(painter); } -bool JKQTPbarVerticalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBarVerticalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { bool start=true; minx=0; maxx=0; @@ -201,7 +201,7 @@ bool JKQTPbarVerticalGraph::getXMinMax(double& minx, double& maxx, double& small if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -251,7 +251,7 @@ bool JKQTPbarVerticalGraph::getXMinMax(double& minx, double& maxx, double& small return !start; } -bool JKQTPbarVerticalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBarVerticalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=0; maxy=0; smallestGreaterZero=0; @@ -263,7 +263,7 @@ bool JKQTPbarVerticalGraph::getYMinMax(double& miny, double& maxy, double& small if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -305,13 +305,13 @@ bool JKQTPbarVerticalGraph::getYMinMax(double& miny, double& maxy, double& small return true; } -void JKQTPbarVerticalGraph::autoscaleBarWidthAndShift(double maxWidth, double shrinkFactor) +void JKQTPBarVerticalGraph::autoscaleBarWidthAndShift(double maxWidth, double shrinkFactor) { if (parent) { double cntH=0; for (size_t i=0; igetGraphCount(); i++) { - JKQTPplotElement* g=parent->getGraph(i); - JKQTPbarVerticalGraph* gb=qobject_cast(g); + JKQTPPlotElement* g=parent->getGraph(i); + JKQTPBarVerticalGraph* gb=qobject_cast(g); if (gb && gb->isHorizontal()==isHorizontal()) { cntH++; } @@ -322,8 +322,8 @@ void JKQTPbarVerticalGraph::autoscaleBarWidthAndShift(double maxWidth, double sh double dH=maxWidth/(cntH); double h=0.1+dH/2.0; for (size_t i=0; igetGraphCount(); i++) { - JKQTPplotElement* g=parent->getGraph(i); - JKQTPbarVerticalGraph* gb=qobject_cast(g); + JKQTPPlotElement* g=parent->getGraph(i); + JKQTPBarVerticalGraph* gb=qobject_cast(g); if (gb && gb->isHorizontal()==isHorizontal()) { if (cntH>1) { gb->width=widthH; @@ -339,7 +339,7 @@ void JKQTPbarVerticalGraph::autoscaleBarWidthAndShift(double maxWidth, double sh } } -void JKQTPbarVerticalGraph::autoscaleBarWidthAndShiftSeparatedGroups(double groupWidth) { +void JKQTPBarVerticalGraph::autoscaleBarWidthAndShiftSeparatedGroups(double groupWidth) { autoscaleBarWidthAndShift(groupWidth, 1); } @@ -352,24 +352,24 @@ void JKQTPbarVerticalGraph::autoscaleBarWidthAndShiftSeparatedGroups(double grou -JKQTPbarHorizontalGraph::JKQTPbarHorizontalGraph(JKQtBasePlotter *parent): - JKQTPbarVerticalGraph(parent) +JKQTPBarHorizontalGraph::JKQTPBarHorizontalGraph(JKQTBasePlotter *parent): + JKQTPBarVerticalGraph(parent) { } -JKQTPbarHorizontalGraph::JKQTPbarHorizontalGraph(JKQtPlotter *parent): - JKQTPbarVerticalGraph(parent) +JKQTPBarHorizontalGraph::JKQTPBarHorizontalGraph(JKQTPLotter *parent): + JKQTPBarVerticalGraph(parent) { } -void JKQTPbarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPBarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPbarVerticalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPBarVerticalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -462,7 +462,7 @@ void JKQTPbarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { drawErrorsAfter(painter); } -bool JKQTPbarHorizontalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBarHorizontalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=0; maxx=0; smallestGreaterZero=0; @@ -474,7 +474,7 @@ bool JKQTPbarHorizontalGraph::getXMinMax(double& minx, double& maxx, double& sma if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -516,7 +516,7 @@ bool JKQTPbarHorizontalGraph::getXMinMax(double& minx, double& maxx, double& sma return true; } -bool JKQTPbarHorizontalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBarHorizontalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { bool start=true; miny=0; maxy=0; @@ -524,7 +524,7 @@ bool JKQTPbarHorizontalGraph::getYMinMax(double& miny, double& maxy, double& sma if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -573,7 +573,7 @@ bool JKQTPbarHorizontalGraph::getYMinMax(double& miny, double& maxy, double& sma return !start; } -bool JKQTPbarHorizontalGraph::isHorizontal() const +bool JKQTPBarHorizontalGraph::isHorizontal() const { return true; } @@ -584,14 +584,14 @@ bool JKQTPbarHorizontalGraph::isHorizontal() const -QBrush JKQTPbarVerticalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPBarVerticalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPbarVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPBarVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -602,55 +602,55 @@ QPen JKQTPbarVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { return p; } -double JKQTPbarVerticalGraph::getParentStackedMax(int /*index*/) const +double JKQTPBarVerticalGraph::getParentStackedMax(int /*index*/) const { return false; } -bool JKQTPbarVerticalGraph::hasStackParent() const +bool JKQTPBarVerticalGraph::hasStackParent() const { return false; } -double JKQTPbarVerticalGraph::getStackedMax(int /*index*/) const +double JKQTPBarVerticalGraph::getStackedMax(int /*index*/) const { return baseline; } -bool JKQTPbarVerticalGraph::isHorizontal() const +bool JKQTPBarVerticalGraph::isHorizontal() const { return false; } -void JKQTPbarVerticalGraph::set_fillColor_and_darkenedColor(QColor fill, int colorDarker) +void JKQTPBarVerticalGraph::set_fillColor_and_darkenedColor(QColor fill, int colorDarker) { set_fillColor(fill); set_color(fill.darker(colorDarker)); } -JKQTPbarHorizontalErrorGraph::JKQTPbarHorizontalErrorGraph(JKQtBasePlotter *parent): - JKQTPbarHorizontalGraph(parent), JKQTPxGraphErrors() +JKQTPBarHorizontalErrorGraph::JKQTPBarHorizontalErrorGraph(JKQTBasePlotter *parent): + JKQTPBarHorizontalGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPbarHorizontalErrorGraph::JKQTPbarHorizontalErrorGraph(JKQtPlotter *parent): - JKQTPbarHorizontalGraph(parent), JKQTPxGraphErrors() +JKQTPBarHorizontalErrorGraph::JKQTPBarHorizontalErrorGraph(JKQTPLotter *parent): + JKQTPBarHorizontalGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPbarHorizontalErrorGraph::usesColumn(int c) const +bool JKQTPBarHorizontalErrorGraph::usesColumn(int c) const { - return JKQTPbarHorizontalGraph::usesColumn(c)|| JKQTPxGraphErrors::errorUsesColumn(c); + return JKQTPBarHorizontalGraph::usesColumn(c)|| JKQTPXGraphErrors::errorUsesColumn(c); } -bool JKQTPbarHorizontalErrorGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) +bool JKQTPBarHorizontalErrorGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { - if (xErrorColumn<0 || xErrorStyle==JKQTPnoError) { - return JKQTPbarHorizontalGraph::getXMinMax(minx, maxx, smallestGreaterZero); + if (xErrorColumn<0 || xErrorStyle==JKQTPNoError) { + return JKQTPBarHorizontalGraph::getXMinMax(minx, maxx, smallestGreaterZero); } else { bool start=false; minx=0; @@ -659,7 +659,7 @@ bool JKQTPbarHorizontalErrorGraph::getXMinMax(double &minx, double &maxx, double if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -696,32 +696,32 @@ bool JKQTPbarHorizontalErrorGraph::getXMinMax(double &minx, double &maxx, double } } -void JKQTPbarHorizontalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPBarHorizontalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0.0, shift); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0.0, shift); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0.0, shift, &sortedIndices); } -JKQTPbarVerticalErrorGraph::JKQTPbarVerticalErrorGraph(JKQtBasePlotter *parent): - JKQTPbarVerticalGraph(parent), JKQTPyGraphErrors() +JKQTPBarVerticalErrorGraph::JKQTPBarVerticalErrorGraph(JKQTBasePlotter *parent): + JKQTPBarVerticalGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPbarVerticalErrorGraph::JKQTPbarVerticalErrorGraph(JKQtPlotter *parent): - JKQTPbarVerticalGraph(parent), JKQTPyGraphErrors() +JKQTPBarVerticalErrorGraph::JKQTPBarVerticalErrorGraph(JKQTPLotter *parent): + JKQTPBarVerticalGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPbarVerticalErrorGraph::usesColumn(int c) const +bool JKQTPBarVerticalErrorGraph::usesColumn(int c) const { - return JKQTPbarVerticalGraph::usesColumn(c)|| JKQTPyGraphErrors::errorUsesColumn(c); + return JKQTPBarVerticalGraph::usesColumn(c)|| JKQTPYGraphErrors::errorUsesColumn(c); } -bool JKQTPbarVerticalErrorGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) +bool JKQTPBarVerticalErrorGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { - if (yErrorColumn<0 || yErrorStyle==JKQTPnoError) { + if (yErrorColumn<0 || yErrorStyle==JKQTPNoError) { miny=0; maxy=0; smallestGreaterZero=0; @@ -733,7 +733,7 @@ bool JKQTPbarVerticalErrorGraph::getYMinMax(double &miny, double &maxy, double & if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -781,7 +781,7 @@ bool JKQTPbarVerticalErrorGraph::getYMinMax(double &miny, double &maxy, double & if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -818,36 +818,36 @@ bool JKQTPbarVerticalErrorGraph::getYMinMax(double &miny, double &maxy, double & } } -void JKQTPbarVerticalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPBarVerticalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { //plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, shift, 0.0); - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, shift, 0.0); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, shift, 0.0); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, shift, 0, &sortedIndices); } -JKQTPbarVerticalStackableGraph::JKQTPbarVerticalStackableGraph(JKQtBasePlotter *parent): - JKQTPbarVerticalGraph(parent), stackParent(nullptr) +JKQTPBarVerticalStackableGraph::JKQTPBarVerticalStackableGraph(JKQTBasePlotter *parent): + JKQTPBarVerticalGraph(parent), stackParent(nullptr) { } -JKQTPbarVerticalStackableGraph::JKQTPbarVerticalStackableGraph(JKQtPlotter *parent): - JKQTPbarVerticalGraph(parent), stackParent(nullptr) +JKQTPBarVerticalStackableGraph::JKQTPBarVerticalStackableGraph(JKQTPLotter *parent): + JKQTPBarVerticalGraph(parent), stackParent(nullptr) { } -void JKQTPbarVerticalStackableGraph::stackUpon(JKQTPbarVerticalStackableGraph *parentGraph) +void JKQTPBarVerticalStackableGraph::stackUpon(JKQTPBarVerticalStackableGraph *parentGraph) { stackParent=parentGraph; } -void JKQTPbarVerticalStackableGraph::dontStackUpon() +void JKQTPBarVerticalStackableGraph::dontStackUpon() { stackParent=nullptr; } -double JKQTPbarVerticalStackableGraph::getParentStackedMax(int index) const +double JKQTPBarVerticalStackableGraph::getParentStackedMax(int index) const { if (stackParent) { return stackParent->getStackedMax(index); @@ -856,23 +856,23 @@ double JKQTPbarVerticalStackableGraph::getParentStackedMax(int index) const } } -bool JKQTPbarVerticalStackableGraph::hasStackParent() const +bool JKQTPBarVerticalStackableGraph::hasStackParent() const { return stackParent!=nullptr; } -const JKQTPbarVerticalStackableGraph *JKQTPbarVerticalStackableGraph::getStackParent() const +const JKQTPBarVerticalStackableGraph *JKQTPBarVerticalStackableGraph::getStackParent() const { return stackParent; } -double JKQTPbarVerticalStackableGraph::getStackedMax(int index) const +double JKQTPBarVerticalStackableGraph::getStackedMax(int index) const { double height=0; if (parent!=nullptr) { - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); height=datastore->get(static_cast(yColumn),static_cast(index)); } if (stackParent==nullptr) { @@ -882,39 +882,39 @@ double JKQTPbarVerticalStackableGraph::getStackedMax(int index) const } } -JKQTPbarHorizontalStackableGraph::JKQTPbarHorizontalStackableGraph(JKQtBasePlotter *parent): - JKQTPbarHorizontalGraph(parent), stackParent(nullptr) +JKQTPBarHorizontalStackableGraph::JKQTPBarHorizontalStackableGraph(JKQTBasePlotter *parent): + JKQTPBarHorizontalGraph(parent), stackParent(nullptr) { } -JKQTPbarHorizontalStackableGraph::JKQTPbarHorizontalStackableGraph(JKQtPlotter *parent): - JKQTPbarHorizontalGraph(parent), stackParent(nullptr) +JKQTPBarHorizontalStackableGraph::JKQTPBarHorizontalStackableGraph(JKQTPLotter *parent): + JKQTPBarHorizontalGraph(parent), stackParent(nullptr) { } -void JKQTPbarHorizontalStackableGraph::stackUpon(JKQTPbarHorizontalStackableGraph *parentGraph) +void JKQTPBarHorizontalStackableGraph::stackUpon(JKQTPBarHorizontalStackableGraph *parentGraph) { stackParent=parentGraph; } -void JKQTPbarHorizontalStackableGraph::dontStackUpon() +void JKQTPBarHorizontalStackableGraph::dontStackUpon() { stackParent=nullptr; } -const JKQTPbarHorizontalStackableGraph *JKQTPbarHorizontalStackableGraph::getStackParent() const +const JKQTPBarHorizontalStackableGraph *JKQTPBarHorizontalStackableGraph::getStackParent() const { return stackParent; } -double JKQTPbarHorizontalStackableGraph::getStackedMax(int index) const +double JKQTPBarHorizontalStackableGraph::getStackedMax(int index) const { double height=0; if (parent!=nullptr) { - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); height=datastore->get(static_cast(xColumn),static_cast(index)); } if (stackParent==nullptr) { @@ -924,7 +924,7 @@ double JKQTPbarHorizontalStackableGraph::getStackedMax(int index) const } } -double JKQTPbarHorizontalStackableGraph::getParentStackedMax(int index) const +double JKQTPBarHorizontalStackableGraph::getParentStackedMax(int index) const { if (stackParent) { return stackParent->getStackedMax(index); @@ -933,7 +933,7 @@ double JKQTPbarHorizontalStackableGraph::getParentStackedMax(int index) const } } -bool JKQTPbarHorizontalStackableGraph::hasStackParent() const +bool JKQTPBarHorizontalStackableGraph::hasStackParent() const { return stackParent!=nullptr; } diff --git a/lib/jkqtplotter/jkqtpgraphsbarchart.h b/lib/jkqtplotter/jkqtpgraphsbarchart.h index 69898af124..0aa21df2c8 100644 --- a/lib/jkqtplotter/jkqtpgraphsbarchart.h +++ b/lib/jkqtplotter/jkqtpgraphsbarchart.h @@ -44,7 +44,7 @@ By default the sift parameter is, so the bar is centered at the x-value. The width is 0.9, so adjacent bars are plotted with a small distance between them. It is possible to use these two parameters - to plot multiple bars for every x-value, by having on JKQTPstepHorizontalGraph object per + to plot multiple bars for every x-value, by having on JKQTPStepHorizontalGraph object per set of bars that belong together. For example for three bars per x-value one would set: \verbatim width=0.3 @@ -55,18 +55,18 @@ \image html plot_bargraphverplot.png - You can use JKQTPlotter::addHorizontalBargraph() to add a series of bargraphs, where the width and shift are determined + You can use JKQTPLotter::addHorizontalBargraph() to add a series of bargraphs, where the width and shift are determined automatically. The y-columns are given as a QVector to this function. */ -class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { +class LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarVerticalGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarVerticalGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarVerticalGraph(JKQtPlotter* parent); + JKQTPBarVerticalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -91,7 +91,7 @@ class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { * \param maxWidth the maximum (relative) width, that all bars will span of the (doubled) inter-bar distance * \param shrinkFactor factor, by which the bar are shrinked compared to the available space * - * \note This function will scale ALL graphs of the parent plot, which were derived from JKQTPbarHorizontalGraph, that match in orientation (as returned by isHorizontal() ). + * \note This function will scale ALL graphs of the parent plot, which were derived from JKQTPBarHorizontalGraph, that match in orientation (as returned by isHorizontal() ). */ virtual void autoscaleBarWidthAndShift(double maxWidth=0.9, double shrinkFactor=0.8); void autoscaleBarWidthAndShiftSeparatedGroups(double groupWidth=0.75); @@ -240,7 +240,7 @@ class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { */ double baseline; - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; @@ -249,24 +249,24 @@ class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { /** \brief used to generate stacked plots: returns the upper boundary of this plot in a stack, for the index-th datapoint * - * \note This function returns \a baseline in this implementation. It is implemented in the derived classes JKQTPbarVerticalStackableGraph - * and JKQTPbarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the + * \note This function returns \a baseline in this implementation. It is implemented in the derived classes JKQTPBarVerticalStackableGraph + * and JKQTPBarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the * derived classes that allow for stacking, but can be implemented once centrally. */ virtual double getStackedMax(int index) const; /** \brief calls getStackedMax() on the stack parent (if available) * - * \note This function returns \c 0.0 in this implementation. It is implemented in the derived classes JKQTPbarVerticalStackableGraph - * and JKQTPbarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the + * \note This function returns \c 0.0 in this implementation. It is implemented in the derived classes JKQTPBarVerticalStackableGraph + * and JKQTPBarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the * derived classes that allow for stacking, but can be implemented once centrally. */ virtual double getParentStackedMax(int index) const; /** \brief returns \c true, if a stack parent is set (if available) * - * \note This function returns \c false in this implementation. It is implemented in the derived classes JKQTPbarVerticalStackableGraph - * and JKQTPbarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the + * \note This function returns \c false in this implementation. It is implemented in the derived classes JKQTPBarVerticalStackableGraph + * and JKQTPBarHorizontalStackableGraph. The function is placed here, so the plotting does not have to be reimplemented in the * derived classes that allow for stacking, but can be implemented once centrally. */ virtual bool hasStackParent() const; @@ -280,22 +280,22 @@ class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { * \ingroup jkqtplotter_barssticks * * Draw stacked barcharts by connecting several plots by calling \c set_stackedParent(belowPlot) for each plot - * \image html JKQTPbarVerticalGraphStacked.png + * \image html JKQTPBarVerticalGraphStacked.png * */ -class LIB_EXPORT JKQTPbarVerticalStackableGraph: public JKQTPbarVerticalGraph { +class LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarVerticalStackableGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarVerticalStackableGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarVerticalStackableGraph(JKQtPlotter* parent); + JKQTPBarVerticalStackableGraph(JKQTPLotter* parent); /** \brief stacks this barchart upon the given \a parentGraph */ - void stackUpon(JKQTPbarVerticalStackableGraph* parentGraph); + void stackUpon(JKQTPBarVerticalStackableGraph* parentGraph); /** \brief unstacks this graph (i.e. deletes the parent graph in the stack) */ void dontStackUpon(); /** \brief returns the stack parent graph, or \c nullptr */ - const JKQTPbarVerticalStackableGraph* getStackParent() const; + const JKQTPBarVerticalStackableGraph* getStackParent() const; protected: @@ -303,7 +303,7 @@ class LIB_EXPORT JKQTPbarVerticalStackableGraph: public JKQTPbarVerticalGraph { * * draw stacked barcharts by connecting several plots by calling \c set_stackedParent(belowPlot) for each plot */ - JKQTPbarVerticalStackableGraph* stackParent; + JKQTPBarVerticalStackableGraph* stackParent; /** \brief used to generate stacked plots: returns the upper boundary of this plot in a stack, for the index-th datapoint */ virtual double getStackedMax(int index) const override; @@ -318,19 +318,19 @@ class LIB_EXPORT JKQTPbarVerticalStackableGraph: public JKQTPbarVerticalGraph { * and error indicator * \ingroup jkqtplotter_barssticks * - * This works much the same as JKQTPbarHorizontalGraph. Here is an example output: + * This works much the same as JKQTPBarHorizontalGraph. Here is an example output: * \image html plot_bargraphverploterr.png * */ -class LIB_EXPORT JKQTPbarVerticalErrorGraph: public JKQTPbarVerticalGraph, public JKQTPyGraphErrors { +class LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarVerticalErrorGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarVerticalErrorGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarVerticalErrorGraph(JKQtPlotter* parent); + JKQTPBarVerticalErrorGraph(JKQTPLotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; /** \brief get the maximum and minimum y-value of the graph * @@ -349,17 +349,17 @@ class LIB_EXPORT JKQTPbarVerticalErrorGraph: public JKQTPbarVerticalGraph, publi /*! \brief This implements a bar graph with bars starting at \f$ x=0 \f$ to \f$ x=f(y) \f$ \ingroup jkqtplotter_barssticks - This works much the same as JKQTPbarHorizontalGraph. Here is an example output: + This works much the same as JKQTPBarHorizontalGraph. Here is an example output: \image html plot_bargraphhorplot.png */ -class LIB_EXPORT JKQTPbarHorizontalGraph: public JKQTPbarVerticalGraph { +class LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarHorizontalGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarHorizontalGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarHorizontalGraph(JKQtPlotter* parent); + JKQTPBarHorizontalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -386,22 +386,22 @@ class LIB_EXPORT JKQTPbarHorizontalGraph: public JKQTPbarVerticalGraph { * \ingroup jkqtplotter_barssticks * * Draw stacked barcharts by connecting several plots by calling \c set_stackedParent(belowPlot) for each plot - * \image html JKQTPbarHorizontalGraphStacked.png + * \image html JKQTPBarHorizontalGraphStacked.png * */ -class LIB_EXPORT JKQTPbarHorizontalStackableGraph: public JKQTPbarHorizontalGraph { +class LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarHorizontalStackableGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarHorizontalStackableGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarHorizontalStackableGraph(JKQtPlotter* parent); + JKQTPBarHorizontalStackableGraph(JKQTPLotter* parent); /** \brief stacks this barchart upon the given \a parentGraph */ - void stackUpon(JKQTPbarHorizontalStackableGraph* parentGraph); + void stackUpon(JKQTPBarHorizontalStackableGraph* parentGraph); /** \brief unstacks this graph (i.e. deletes the parent graph in the stack) */ void dontStackUpon(); /** \brief returns the stack parent graph, or \c nullptr */ - const JKQTPbarHorizontalStackableGraph* getStackParent() const; + const JKQTPBarHorizontalStackableGraph* getStackParent() const; protected: @@ -409,7 +409,7 @@ class LIB_EXPORT JKQTPbarHorizontalStackableGraph: public JKQTPbarHorizontalGrap * * draw stacked barcharts by connecting several plots by calling \c set_stackedParent(belowPlot) for each plot */ - JKQTPbarHorizontalStackableGraph* stackParent; + JKQTPBarHorizontalStackableGraph* stackParent; /** \brief used to generate stacked plots: returns the upper boundary of this plot in a stack, for the index-th datapoint */ virtual double getStackedMax(int index) const override; @@ -424,19 +424,19 @@ class LIB_EXPORT JKQTPbarHorizontalStackableGraph: public JKQTPbarHorizontalGrap * and error indicator * \ingroup jkqtplotter_barssticks * - * This works much the same as JKQTPbarHorizontalGraph. Here is an example output: + * This works much the same as JKQTPBarHorizontalGraph. Here is an example output: * \image html plot_bargraphhorploterr.png * */ -class LIB_EXPORT JKQTPbarHorizontalErrorGraph: public JKQTPbarHorizontalGraph, public JKQTPxGraphErrors { +class LIB_EXPORT JKQTPBarHorizontalErrorGraph: public JKQTPBarHorizontalGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPbarHorizontalErrorGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBarHorizontalErrorGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPbarHorizontalErrorGraph(JKQtPlotter* parent); + JKQTPBarHorizontalErrorGraph(JKQTPLotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; /** \brief get the maximum and minimum x-value of the graph * diff --git a/lib/jkqtplotter/jkqtpgraphsbase.cpp b/lib/jkqtplotter/jkqtpgraphsbase.cpp index 159241b2bb..93a72169a3 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.cpp +++ b/lib/jkqtplotter/jkqtpgraphsbase.cpp @@ -31,7 +31,7 @@ #include "jkqtpgraphsbase.h" #define SmallestGreaterZeroCompare_xvsgz() if ((xvsgz>10.0*DBL_MIN)&&((smallestGreaterZero<10.0*DBL_MIN) || (xvsgzget_plotter()) { title=""; @@ -47,29 +47,29 @@ JKQTPplotElement::JKQTPplotElement(JKQtPlotter *parent): setParent(parent); } -JKQTPplotElement::~JKQTPplotElement() +JKQTPPlotElement::~JKQTPPlotElement() { } -JKQTPgraph::JKQTPgraph(JKQtBasePlotter* parent): - JKQTPplotElement(parent) +JKQTPGraph::JKQTPGraph(JKQTBasePlotter* parent): + JKQTPPlotElement(parent) { datarange_start=datarange_end=-1; } -JKQTPgraph::JKQTPgraph(JKQtPlotter *parent): - JKQTPplotElement(parent) +JKQTPGraph::JKQTPGraph(JKQTPLotter *parent): + JKQTPPlotElement(parent) { datarange_start=datarange_end=-1; } -JKQTPgraph::~JKQTPgraph() +JKQTPGraph::~JKQTPGraph() { } -QImage JKQTPplotElement::generateKeyMarker(QSize size) +QImage JKQTPPlotElement::generateKeyMarker(QSize size) { QImage img(size.width(),size.height(),QImage::Format_ARGB32); if (parent) img.fill(parent->get_keyBackgroundColor()); @@ -89,18 +89,18 @@ QImage JKQTPplotElement::generateKeyMarker(QSize size) -void JKQTPplotElement::setParent(JKQtBasePlotter* parent) { +void JKQTPPlotElement::setParent(JKQTBasePlotter* parent) { this->parent=parent; QObject::setParent(parent); } -void JKQTPplotElement::setParent(JKQtPlotter *parent) +void JKQTPPlotElement::setParent(JKQTPLotter *parent) { setParent(parent->get_plotter()); } -bool JKQTPgraph::getDataMinMax(int column, double &minx, double &maxx, double &smallestGreaterZero) +bool JKQTPGraph::getDataMinMax(int column, double &minx, double &maxx, double &smallestGreaterZero) { bool start=true; minx=0; @@ -109,7 +109,7 @@ bool JKQTPgraph::getDataMinMax(int column, double &minx, double &maxx, double &s if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(column).getRows(); // interpret data ranges @@ -132,50 +132,50 @@ bool JKQTPgraph::getDataMinMax(int column, double &minx, double &maxx, double &s return !start; } -void JKQTPplotElement::getOutsideSize(JKQTPEnhancedPainter& /*painter*/, int& leftSpace, int& rightSpace, int& topSpace, int& bottomspace) { +void JKQTPPlotElement::getOutsideSize(JKQTPEnhancedPainter& /*painter*/, int& leftSpace, int& rightSpace, int& topSpace, int& bottomspace) { leftSpace=0; rightSpace=0; topSpace=0; bottomspace=0; } -void JKQTPplotElement::drawOutside(JKQTPEnhancedPainter& /*painter*/, QRect /*leftSpace*/, QRect /*rightSpace*/, QRect /*topSpace*/, QRect /*bottomSpace*/) { +void JKQTPPlotElement::drawOutside(JKQTPEnhancedPainter& /*painter*/, QRect /*leftSpace*/, QRect /*rightSpace*/, QRect /*topSpace*/, QRect /*bottomSpace*/) { } -double JKQTPplotElement::transformX(double x) const { +double JKQTPPlotElement::transformX(double x) const { return parent->get_xAxis()->x2p(x); } -double JKQTPplotElement::transformY(double y) const { +double JKQTPPlotElement::transformY(double y) const { return parent->get_yAxis()->x2p(y); } -double JKQTPplotElement::backtransformX(double x) const { +double JKQTPPlotElement::backtransformX(double x) const { return parent->get_xAxis()->p2x(x); } -double JKQTPplotElement::backtransformY(double y) const { +double JKQTPPlotElement::backtransformY(double y) const { return parent->get_yAxis()->p2x(y); } -bool JKQTPgraph::usesColumn(int /*column*/) const +bool JKQTPGraph::usesColumn(int /*column*/) const { return false; } -void JKQTPgraph::drawErrorsBefore(JKQTPEnhancedPainter &) +void JKQTPGraph::drawErrorsBefore(JKQTPEnhancedPainter &) { } -void JKQTPgraph::drawErrorsAfter(JKQTPEnhancedPainter &) +void JKQTPGraph::drawErrorsAfter(JKQTPEnhancedPainter &) { } -QVector JKQTPplotElement::transform(const QVector &x) { +QVector JKQTPPlotElement::transform(const QVector &x) { QVector res; for (int i=0; i JKQTPplotElement::transform(const QVector &x) { return res; } -QPainterPath JKQTPplotElement::transformToLinePath(const QVector &x) { +QPainterPath JKQTPPlotElement::transformToLinePath(const QVector &x) { QPainterPath res; if (x.size()>0) { res.moveTo(transform(x[0])); @@ -197,8 +197,8 @@ QPainterPath JKQTPplotElement::transformToLinePath(const QVector &x) { -JKQTPxyGraph::JKQTPxyGraph(JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPXYGraph::JKQTPXYGraph(JKQTBasePlotter* parent): + JKQTPGraph(parent) { sortData=Unsorted; xColumn=-1; @@ -207,8 +207,8 @@ JKQTPxyGraph::JKQTPxyGraph(JKQtBasePlotter* parent): } -JKQTPxyGraph::JKQTPxyGraph(JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPXYGraph::JKQTPXYGraph(JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; xColumn=-1; @@ -216,7 +216,7 @@ JKQTPxyGraph::JKQTPxyGraph(JKQtPlotter *parent): } -bool JKQTPxyGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPXYGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { bool start=true; minx=0; maxx=0; @@ -224,7 +224,7 @@ bool JKQTPxyGraph::getXMinMax(double& minx, double& maxx, double& smallestGreate if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -255,7 +255,7 @@ bool JKQTPxyGraph::getXMinMax(double& minx, double& maxx, double& smallestGreate return !start; } -bool JKQTPxyGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPXYGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { bool start=true; miny=0; maxy=0; @@ -263,7 +263,7 @@ bool JKQTPxyGraph::getYMinMax(double& miny, double& maxy, double& smallestGreate if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -294,20 +294,20 @@ bool JKQTPxyGraph::getYMinMax(double& miny, double& maxy, double& smallestGreate return !start; } -bool JKQTPxyGraph::usesColumn(int column) const +bool JKQTPXYGraph::usesColumn(int column) const { return (column==xColumn)||(column==yColumn); } -void JKQTPxyGraph::set_sortData(int __value) { +void JKQTPXYGraph::set_sortData(int __value) { sortData=(DataSortOrder)__value; } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(JKQtBasePlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(JKQTBasePlotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; dataColumn=-1; @@ -325,8 +325,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(JKQtBasePlotter *parent): } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, JKQtBasePlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, JKQTBasePlotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -344,8 +344,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, JKQtBasePlotter * } } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQtBasePlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQTBasePlotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -356,8 +356,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt: } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; dataColumn=-1; @@ -375,8 +375,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(JKQtPlotter *parent): } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -394,8 +394,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, JKQtPlotter *pare } } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -405,8 +405,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt: parentPlotStyle=-1; } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -416,8 +416,8 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt: parentPlotStyle=-1; } -JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPSingleColumnGraph::JKQTPSingleColumnGraph(int dataColumn, QColor color, JKQTPLotter *parent): + JKQTPGraph(parent) { sortData=Unsorted; this->dataColumn=dataColumn; @@ -426,22 +426,22 @@ JKQTPsingleColumnGraph::JKQTPsingleColumnGraph(int dataColumn, QColor color, JKQ this->lineWidth=2.0; parentPlotStyle=-1; } -QColor JKQTPsingleColumnGraph::getKeyLabelColor() +QColor JKQTPSingleColumnGraph::getKeyLabelColor() { return color; } -void JKQTPsingleColumnGraph::set_sortData(int __value) { +void JKQTPSingleColumnGraph::set_sortData(int __value) { sortData=(DataSortOrder)__value; if (__value>0) sortData=Sorted; } -bool JKQTPsingleColumnGraph::usesColumn(int c) const +bool JKQTPSingleColumnGraph::usesColumn(int c) const { return c==dataColumn; } -QPen JKQTPsingleColumnGraph::getLinePen(JKQTPEnhancedPainter& painter) const +QPen JKQTPSingleColumnGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); @@ -452,7 +452,7 @@ QPen JKQTPsingleColumnGraph::getLinePen(JKQTPEnhancedPainter& painter) const return p; } -void JKQTPsingleColumnGraph::intSortData() +void JKQTPSingleColumnGraph::intSortData() { sortedIndices.clear(); @@ -460,7 +460,7 @@ void JKQTPsingleColumnGraph::intSortData() if (parent==nullptr) return ; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(dataColumn).getRows(); // interpret data ranges @@ -480,7 +480,7 @@ void JKQTPsingleColumnGraph::intSortData() QVector datas; - if (sortData==JKQTPsingleColumnGraph::Sorted) { + if (sortData==JKQTPSingleColumnGraph::Sorted) { for (int i=0; iget(dataColumn,i); @@ -506,7 +506,7 @@ void JKQTPsingleColumnGraph::intSortData() -JKQTPgraphErrors::JKQTPgraphErrors(QColor graphColor) { +JKQTPGraphErrors::JKQTPGraphErrors(QColor graphColor) { errorColor=graphColor.darker(); errorStyle=Qt::SolidLine; errorWidth=2; @@ -516,24 +516,24 @@ JKQTPgraphErrors::JKQTPgraphErrors(QColor graphColor) { errorbarSize=7; } -JKQTPgraphErrors::~JKQTPgraphErrors() +JKQTPGraphErrors::~JKQTPGraphErrors() { } -void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, JKQtBasePlotter* parent, JKQTPgraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPerrorPlotstyle xErrorStyle, JKQTPerrorPlotstyle yErrorStyle, int datarange_start, int datarange_end, int xErrorColumnLower, int yErrorColumnLower, bool xErrorSymmetric, bool yErrorSymmetric, double xrelshift, double yrelshift, const QVector* dataorder) { - //std::cout<<"JKQTPgraphErrors::intPlotXYErrorIndicators(p, "<* dataorder) { + //std::cout<<"JKQTPGraphErrors::intPlotXYErrorIndicators(p, "<getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; - if ((yErrorStyle==JKQTPnoError) && (xErrorStyle==JKQTPnoError)) return; - bool visX=(xErrorStyle!=JKQTPnoError)&&(xErrorColumn>=0||xErrorColumnLower>=0)&&(xColumn>=0)&&(yColumn>=0); - bool visY=(yErrorStyle!=JKQTPnoError)&&(yErrorColumn>=0||yErrorColumnLower>=0)&&(xColumn>=0)&&(yColumn>=0); + if ((yErrorStyle==JKQTPNoError) && (xErrorStyle==JKQTPNoError)) return; + bool visX=(xErrorStyle!=JKQTPNoError)&&(xErrorColumn>=0||xErrorColumnLower>=0)&&(xColumn>=0)&&(yColumn>=0); + bool visY=(yErrorStyle!=JKQTPNoError)&&(yErrorColumn>=0||yErrorColumnLower>=0)&&(xColumn>=0)&&(yColumn>=0); if (!visX&&!visY) return; - //std::cout<<" JKQTPgraphErrors::intPlotXYErrorIndicators(p, "<=0) { xe=datastore->get(xErrorColumn,i); plotupperbarx=true; } - double ye=0; if (yErrorStyle!=JKQTPnoError && yErrorColumn>=0) { ye=datastore->get(yErrorColumn,i); plotupperbary=true; } + double xe=0; if (xErrorStyle!=JKQTPNoError && xErrorColumn>=0) { xe=datastore->get(xErrorColumn,i); plotupperbarx=true; } + double ye=0; if (yErrorStyle!=JKQTPNoError && yErrorColumn>=0) { ye=datastore->get(yErrorColumn,i); plotupperbary=true; } double xl=0; if (xErrorSymmetric) { xl=xe; plotlowerbarx=plotupperbarx||(xl>0); } - else if (xErrorStyle!=JKQTPnoError && xErrorColumnLower>=0) { xl=datastore->get(xErrorColumnLower,i); plotlowerbarx=true; } + else if (xErrorStyle!=JKQTPNoError && xErrorColumnLower>=0) { xl=datastore->get(xErrorColumnLower,i); plotlowerbarx=true; } double yl=0; if (yErrorSymmetric) { yl=ye; plotlowerbary=plotupperbary||(yl>0); } - else if (yErrorStyle!=JKQTPnoError && yErrorColumnLower>=0) { yl=datastore->get(yErrorColumnLower,i); plotlowerbary=true; } + else if (yErrorStyle!=JKQTPNoError && yErrorColumnLower>=0) { yl=datastore->get(yErrorColumnLower,i); plotlowerbary=true; } if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv) && JKQTPIsOKFloat(xe) && JKQTPIsOKFloat(ye) && JKQTPIsOKFloat(xl) && JKQTPIsOKFloat(yl)) { double x=parentGraph->transformX(xv+xrelshift*deltax); bool xok=JKQTPIsOKFloat(x); double y=parentGraph->transformY(yv+yrelshift*deltay); bool yok=JKQTPIsOKFloat(y); @@ -658,7 +658,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J defaultErrorColor = defaultErrorColor && !this->intPlotXYErrorIndicatorsGetColor(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, yErrorColumn, xErrorStyle, yErrorStyle, i, terrCol, terrFillCol); // x-errorpolygons - if (/*pastFirst &&*/ (xErrorStyle==JKQTPerrorPolygons || xErrorStyle==JKQTPerrorBarsPolygons || xErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if (/*pastFirst &&*/ (xErrorStyle==JKQTPErrorPolygons || xErrorStyle==JKQTPErrorBarsPolygons || xErrorStyle==JKQTPErrorSimpleBarsPolygons)) { //double xl1m=xmold; //double xl1p=xpold; //double yl1=yold; @@ -679,7 +679,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J } // y-errorpolygons - if (/*pastFirst &&*/ (yErrorStyle==JKQTPerrorPolygons || yErrorStyle==JKQTPerrorBarsPolygons || yErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if (/*pastFirst &&*/ (yErrorStyle==JKQTPErrorPolygons || yErrorStyle==JKQTPErrorBarsPolygons || yErrorStyle==JKQTPErrorSimpleBarsPolygons)) { //double yl1m=ymold; //double yl1p=ypold; //double xl1=xold; @@ -702,8 +702,8 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J //if (xv>=xmin && xv<=xmax && yv>=ymin && yv<=ymax) { //x-errorbars - if ((xErrorColumn>=0 || xErrorColumnLower>=0) && (xErrorStyle==JKQTPerrorBars || xErrorStyle==JKQTPerrorBarsLines|| xErrorStyle==JKQTPerrorBarsPolygons - || xErrorStyle==JKQTPerrorSimpleBars || xErrorStyle==JKQTPerrorSimpleBarsLines|| xErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if ((xErrorColumn>=0 || xErrorColumnLower>=0) && (xErrorStyle==JKQTPErrorBars || xErrorStyle==JKQTPErrorBarsLines|| xErrorStyle==JKQTPErrorBarsPolygons + || xErrorStyle==JKQTPErrorSimpleBars || xErrorStyle==JKQTPErrorSimpleBarsLines|| xErrorStyle==JKQTPErrorSimpleBarsPolygons)) { double x0=parentGraph->transformX(xv+xrelshift*deltax-xl); bool x0ok=JKQTPIsOKFloat(x0); double x1=parentGraph->transformX(xv+xrelshift*deltax+xe); bool x1ok=JKQTPIsOKFloat(x1); painter.save(); @@ -712,20 +712,20 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J painter.setPen(pp); if (x0ok&&x1ok&&xok&&yok) { painter.drawLine(QLineF(x0, y, x1, y)); - if (xErrorStyle==JKQTPerrorBars || xErrorStyle==JKQTPerrorBarsLines|| xErrorStyle==JKQTPerrorBarsPolygons) { + if (xErrorStyle==JKQTPErrorBars || xErrorStyle==JKQTPErrorBarsLines|| xErrorStyle==JKQTPErrorBarsPolygons) { if (plotlowerbarx) painter.drawLine(QLineF(x0,y-ebs_px/2.0,x0,y+ebs_px/2.0)); if (plotupperbarx) painter.drawLine(QLineF(x1,y-ebs_px/2.0,x1,y+ebs_px/2.0)); } } else if (x0ok&&!x1ok&&xok&&yok) { painter.drawLine(QLineF(x0, y, x, y)); - if (xErrorStyle==JKQTPerrorBars || xErrorStyle==JKQTPerrorBarsLines|| xErrorStyle==JKQTPerrorBarsPolygons) { + if (xErrorStyle==JKQTPErrorBars || xErrorStyle==JKQTPErrorBarsLines|| xErrorStyle==JKQTPErrorBarsPolygons) { if (plotlowerbarx) painter.drawLine(QLineF(x0,y-ebs_px/2.0,x0,y+ebs_px/2.0)); } if (x0transformX(parent->getXMax()),y)); else painter.drawLine(QLineF(x,y,parentGraph->transformX(parent->getXMin()),y)); } else if (!x0ok&&x1ok&&xok&&yok) { painter.drawLine(QLineF(x1, y, x, y)); - if (xErrorStyle==JKQTPerrorBars || xErrorStyle==JKQTPerrorBarsLines|| xErrorStyle==JKQTPerrorBarsPolygons) { + if (xErrorStyle==JKQTPErrorBars || xErrorStyle==JKQTPErrorBarsLines|| xErrorStyle==JKQTPErrorBarsPolygons) { if (plotupperbarx) painter.drawLine(QLineF(x1,y-ebs_px/2.0,x1,y+ebs_px/2.0)); } if (x1transformX(parent->getXMin()),y)); @@ -734,8 +734,8 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J painter.restore(); } // y-errorbars - if ((yErrorColumn>=0 || yErrorColumnLower>=0) && (yErrorStyle==JKQTPerrorBars || yErrorStyle==JKQTPerrorBarsLines || yErrorStyle==JKQTPerrorBarsPolygons - || yErrorStyle==JKQTPerrorSimpleBars || yErrorStyle==JKQTPerrorSimpleBarsLines || yErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if ((yErrorColumn>=0 || yErrorColumnLower>=0) && (yErrorStyle==JKQTPErrorBars || yErrorStyle==JKQTPErrorBarsLines || yErrorStyle==JKQTPErrorBarsPolygons + || yErrorStyle==JKQTPErrorSimpleBars || yErrorStyle==JKQTPErrorSimpleBarsLines || yErrorStyle==JKQTPErrorSimpleBarsPolygons)) { double y0=parentGraph->transformY(yv+yrelshift*deltay-yl); bool y0ok=JKQTPIsOKFloat(y0); double y1=parentGraph->transformY(yv+yrelshift*deltay+ye); bool y1ok=JKQTPIsOKFloat(y1); painter.save(); @@ -744,20 +744,20 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J painter.setPen(pp); if (y0ok&&y1ok&&xok&&yok) { painter.drawLine(QLineF(x, y0, x, y1)); - if (yErrorStyle==JKQTPerrorBars || yErrorStyle==JKQTPerrorBarsLines || yErrorStyle==JKQTPerrorBarsPolygons) { + if (yErrorStyle==JKQTPErrorBars || yErrorStyle==JKQTPErrorBarsLines || yErrorStyle==JKQTPErrorBarsPolygons) { if (plotlowerbary) painter.drawLine(QLineF(x-ebs_px/2.0,y0,x+ebs_px/2.0,y0)); if (plotupperbary) painter.drawLine(QLineF(x-ebs_px/2.0,y1,x+ebs_px/2.0,y1)); } } else if (y0ok&&!y1ok&&xok&&yok) { // upper errorbar OK, lower errorbar NAN painter.drawLine(QLineF(x, y0, x, y)); - if (yErrorStyle==JKQTPerrorBars || yErrorStyle==JKQTPerrorBarsLines || yErrorStyle==JKQTPerrorBarsPolygons) { + if (yErrorStyle==JKQTPErrorBars || yErrorStyle==JKQTPErrorBarsLines || yErrorStyle==JKQTPErrorBarsPolygons) { if (plotlowerbary) painter.drawLine(QLineF(x-ebs_px/2.0,y0,x+ebs_px/2.0,y0)); } if (y0transformY(parent->getYMin()))); else painter.drawLine(QLineF(x,y,x,parentGraph->transformY(parent->getYMax()))); // inverted axis! } else if (!y0ok&&y1ok&&xok&&yok) { painter.drawLine(QLineF(x, y1, x, y)); - if (yErrorStyle==JKQTPerrorBars || yErrorStyle==JKQTPerrorBarsLines || yErrorStyle==JKQTPerrorBarsPolygons) { + if (yErrorStyle==JKQTPErrorBars || yErrorStyle==JKQTPErrorBarsLines || yErrorStyle==JKQTPErrorBarsPolygons) { if (plotupperbary) painter.drawLine(QLineF(x-ebs_px/2.0,y1,x+ebs_px/2.0,y1)); } if (y1transformY(parent->getYMax()))); @@ -768,7 +768,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J } // error boxes - if (yErrorStyle==JKQTPerrorBoxes || xErrorStyle==JKQTPerrorBoxes || yErrorStyle==JKQTPerrorEllipses || xErrorStyle==JKQTPerrorEllipses ) { + if (yErrorStyle==JKQTPErrorBoxes || xErrorStyle==JKQTPErrorBoxes || yErrorStyle==JKQTPErrorEllipses || xErrorStyle==JKQTPErrorEllipses ) { double y0=parentGraph->transformY(yv+yrelshift*deltay-yl); bool y0ok=JKQTPIsOKFloat(y0); double y1=parentGraph->transformY(yv+yrelshift*deltay+ye); bool y1ok=JKQTPIsOKFloat(y1); double x0=parentGraph->transformX(xv+xrelshift*deltax-xl); bool x0ok=JKQTPIsOKFloat(x0); @@ -783,7 +783,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J QRectF errRect=QRectF(QPointF(x0,y0), QPointF(x1,y1)); if ((y0ok&&y1ok)||(x0ok&&x1ok)) { - if (yErrorStyle==JKQTPerrorEllipses || xErrorStyle==JKQTPerrorEllipses) painter.drawEllipse(errRect); + if (yErrorStyle==JKQTPErrorEllipses || xErrorStyle==JKQTPErrorEllipses) painter.drawEllipse(errRect); else painter.drawRect(errRect); } @@ -791,7 +791,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J } //} // x-errorlines - if (pastFirst && (xErrorStyle==JKQTPerrorLines || xErrorStyle==JKQTPerrorBarsLines || xErrorStyle==JKQTPerrorSimpleBarsLines)) { + if (pastFirst && (xErrorStyle==JKQTPErrorLines || xErrorStyle==JKQTPErrorBarsLines || xErrorStyle==JKQTPErrorSimpleBarsLines)) { double xl1m=xmold; double xl1p=xpold; double yl1=yold; @@ -813,7 +813,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J // y-errorlines - if (pastFirst && (yErrorStyle==JKQTPerrorLines || yErrorStyle==JKQTPerrorBarsLines || yErrorStyle==JKQTPerrorSimpleBarsLines)) { + if (pastFirst && (yErrorStyle==JKQTPErrorLines || yErrorStyle==JKQTPErrorBarsLines || yErrorStyle==JKQTPErrorSimpleBarsLines)) { double yl1m=ymold; double yl1p=ypold; double xl1=xold; @@ -845,7 +845,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J } } // x-errorpolygons - if ((polyXTopPoints.size()>0 || polyXBottomPoints.size()>0) && (xErrorStyle==JKQTPerrorPolygons || xErrorStyle==JKQTPerrorBarsPolygons || xErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if ((polyXTopPoints.size()>0 || polyXBottomPoints.size()>0) && (xErrorStyle==JKQTPErrorPolygons || xErrorStyle==JKQTPErrorBarsPolygons || xErrorStyle==JKQTPErrorSimpleBarsPolygons)) { painter.save(); painter.setBrush(b); painter.setPen(QPen(Qt::NoPen)); @@ -860,7 +860,7 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J painter.drawConvexPolygon(poly); painter.restore(); } - if ((polyYTopPoints.size()>0 || polyYBottomPoints.size()>0) && (yErrorStyle==JKQTPerrorPolygons || yErrorStyle==JKQTPerrorBarsPolygons || yErrorStyle==JKQTPerrorSimpleBarsPolygons)) { + if ((polyYTopPoints.size()>0 || polyYBottomPoints.size()>0) && (yErrorStyle==JKQTPErrorPolygons || yErrorStyle==JKQTPErrorBarsPolygons || yErrorStyle==JKQTPErrorSimpleBarsPolygons)) { painter.save(); painter.setBrush(b); painter.setPen(QPen(Qt::NoPen)); @@ -878,27 +878,27 @@ void JKQTPgraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J //std::cout<<"end\n"; } -bool JKQTPgraphErrors::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQtBasePlotter * /*parent*/, JKQTPgraph* /*parentGraph*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPerrorPlotstyle /*xErrorStyle*/, JKQTPerrorPlotstyle /*yErrorStyle*/, int /*index*/, QColor &/*errorColor*/, QColor &/*errorFillColor*/) +bool JKQTPGraphErrors::intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &/*painter*/, JKQTBasePlotter * /*parent*/, JKQTPGraph* /*parentGraph*/, int /*xColumn*/, int /*yColumn*/, int /*xErrorColumn*/, int /*yErrorColumn*/, JKQTPErrorPlotstyle /*xErrorStyle*/, JKQTPErrorPlotstyle /*yErrorStyle*/, int /*index*/, QColor &/*errorColor*/, QColor &/*errorFillColor*/) { return false; } -double JKQTPgraphErrors::getXErrorU(int /*i*/, JKQTPdatastore * /*ds*/) const +double JKQTPGraphErrors::getXErrorU(int /*i*/, JKQTPDatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getXErrorL(int /*i*/, JKQTPdatastore * /*ds*/) const +double JKQTPGraphErrors::getXErrorL(int /*i*/, JKQTPDatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getYErrorU(int /*i*/, JKQTPdatastore * /*ds*/) const +double JKQTPGraphErrors::getYErrorU(int /*i*/, JKQTPDatastore * /*ds*/) const { return 0.0; } -double JKQTPgraphErrors::getYErrorL(int/* i*/, JKQTPdatastore * /*ds*/) const +double JKQTPGraphErrors::getYErrorL(int/* i*/, JKQTPDatastore * /*ds*/) const { return 0.0; } @@ -909,34 +909,34 @@ double JKQTPgraphErrors::getYErrorL(int/* i*/, JKQTPdatastore * /*ds*/) const -JKQTPxGraphErrors::JKQTPxGraphErrors(QColor graphColor): - JKQTPgraphErrors(graphColor) +JKQTPXGraphErrors::JKQTPXGraphErrors(QColor graphColor): + JKQTPGraphErrors(graphColor) { xErrorSymmetric=true; xErrorColumn=-1; - xErrorStyle=JKQTPnoError; + xErrorStyle=JKQTPNoError; xErrorColumnLower=-1; } -void JKQTPxGraphErrors::set_xErrorColumn(int __value) { +void JKQTPXGraphErrors::set_xErrorColumn(int __value) { if (this->xErrorColumn != __value) { this->xErrorColumn = __value; - if (xErrorColumn>=0 && xErrorStyle==JKQTPnoError) xErrorStyle=JKQTPerrorBars; + if (xErrorColumn>=0 && xErrorStyle==JKQTPNoError) xErrorStyle=JKQTPErrorBars; } } -void JKQTPxGraphErrors::set_xErrorColumnLower(int __value) { +void JKQTPXGraphErrors::set_xErrorColumnLower(int __value) { if (this->xErrorColumnLower != __value) { this->xErrorColumnLower = __value; - if (xErrorColumnLower>=0 && xErrorStyle==JKQTPnoError) xErrorStyle=JKQTPerrorBars; + if (xErrorColumnLower>=0 && xErrorStyle==JKQTPNoError) xErrorStyle=JKQTPErrorBars; } } -void JKQTPxGraphErrors::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, 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, int datarange_start, int datarange_end, double xrelshift, double yrelshift, const QVector* dataorder) { + intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, -1, xErrorStyle, JKQTPNoError, datarange_start, datarange_end, xErrorColumnLower, -1, xErrorSymmetric, true, xrelshift, yrelshift, dataorder); } -double JKQTPxGraphErrors::getXErrorU(int i, JKQTPdatastore *ds) const +double JKQTPXGraphErrors::getXErrorU(int i, JKQTPDatastore *ds) const { if (ds && xErrorColumn>=0) { return ds->get(xErrorColumn, i); @@ -944,7 +944,7 @@ double JKQTPxGraphErrors::getXErrorU(int i, JKQTPdatastore *ds) const return 0.0; } -double JKQTPxGraphErrors::getXErrorL(int i, JKQTPdatastore *ds) const +double JKQTPXGraphErrors::getXErrorL(int i, JKQTPDatastore *ds) const { if (ds) { if (xErrorSymmetric) { if (xErrorColumn>=0) return ds->get(xErrorColumn, i); } @@ -959,20 +959,20 @@ double JKQTPxGraphErrors::getXErrorL(int i, JKQTPdatastore *ds) const -JKQTPyGraphErrors::JKQTPyGraphErrors(QColor graphColor): - JKQTPgraphErrors(graphColor) +JKQTPYGraphErrors::JKQTPYGraphErrors(QColor graphColor): + JKQTPGraphErrors(graphColor) { yErrorColumn=-1; yErrorSymmetric=true; - yErrorStyle=JKQTPnoError; + yErrorStyle=JKQTPNoError; 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, 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); } -double JKQTPyGraphErrors::getYErrorU(int i, JKQTPdatastore *ds) const +double JKQTPYGraphErrors::getYErrorU(int i, JKQTPDatastore *ds) const { if (ds && yErrorColumn>=0) { return ds->get(yErrorColumn, i); @@ -980,7 +980,7 @@ double JKQTPyGraphErrors::getYErrorU(int i, JKQTPdatastore *ds) const return 0.0; } -double JKQTPyGraphErrors::getYErrorL(int i, JKQTPdatastore *ds) const +double JKQTPYGraphErrors::getYErrorL(int i, JKQTPDatastore *ds) const { if (ds) { if (yErrorSymmetric) { if (yErrorColumn>=0) return ds->get(yErrorColumn, i); } @@ -995,25 +995,25 @@ double JKQTPyGraphErrors::getYErrorL(int i, JKQTPdatastore *ds) const -JKQTPxyGraphErrors::JKQTPxyGraphErrors(QColor graphColor): - JKQTPgraphErrors(graphColor) +JKQTPXYGraphErrors::JKQTPXYGraphErrors(QColor graphColor): + JKQTPGraphErrors(graphColor) { xErrorSymmetric=true; yErrorSymmetric=true; yErrorColumn=-1; - yErrorStyle=JKQTPnoError; + yErrorStyle=JKQTPNoError; xErrorColumn=-1; - xErrorStyle=JKQTPnoError; + xErrorStyle=JKQTPNoError; xErrorColumnLower=-1; yErrorColumnLower=-1; } -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) { +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); } -double JKQTPxyGraphErrors::getXErrorU(int i, JKQTPdatastore *ds) const +double JKQTPXYGraphErrors::getXErrorU(int i, JKQTPDatastore *ds) const { if (ds && xErrorColumn>=0) { return ds->get(xErrorColumn, i); @@ -1021,7 +1021,7 @@ double JKQTPxyGraphErrors::getXErrorU(int i, JKQTPdatastore *ds) const return 0.0; } -double JKQTPxyGraphErrors::getXErrorL(int i, JKQTPdatastore *ds) const +double JKQTPXYGraphErrors::getXErrorL(int i, JKQTPDatastore *ds) const { if (ds && xErrorColumn>=0) { if (xErrorSymmetric) { if (xErrorColumn>=0) return ds->get(xErrorColumn, i); } @@ -1030,7 +1030,7 @@ double JKQTPxyGraphErrors::getXErrorL(int i, JKQTPdatastore *ds) const return 0.0; } -double JKQTPxyGraphErrors::getYErrorU(int i, JKQTPdatastore *ds) const +double JKQTPXYGraphErrors::getYErrorU(int i, JKQTPDatastore *ds) const { if (ds && yErrorColumn>=0) { return ds->get(yErrorColumn, i); @@ -1038,7 +1038,7 @@ double JKQTPxyGraphErrors::getYErrorU(int i, JKQTPdatastore *ds) const return 0.0; } -double JKQTPxyGraphErrors::getYErrorL(int i, JKQTPdatastore *ds) const +double JKQTPXYGraphErrors::getYErrorL(int i, JKQTPDatastore *ds) const { if (ds && yErrorColumn>=0) { if (yErrorSymmetric) { if (yErrorColumn>=0) return ds->get(yErrorColumn, i); } @@ -1055,7 +1055,7 @@ double JKQTPxyGraphErrors::getYErrorL(int i, JKQTPdatastore *ds) const -void JKQTPxyGraph::intSortData() +void JKQTPXYGraph::intSortData() { sortedIndices.clear(); @@ -1063,7 +1063,7 @@ void JKQTPxyGraph::intSortData() if (parent==nullptr) return ; - JKQTPdatastore* datastore=parent->getDatastore(); + 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 @@ -1083,7 +1083,7 @@ void JKQTPxyGraph::intSortData() QVector datas; - if (sortData==JKQTPxyLineGraph::SortedX) { + if (sortData==JKQTPXYLineGraph::SortedX) { for (int i=0; iget(static_cast(xColumn),static_cast(i)); @@ -1094,7 +1094,7 @@ void JKQTPxyGraph::intSortData() jkqtpSort(datas.data(), sortedIndices.data(), datas.size()); - } else if (sortData==JKQTPxyLineGraph::SortedY) { + } else if (sortData==JKQTPXYLineGraph::SortedY) { for (int i=0; iget(static_cast(yColumn),static_cast(i)); @@ -1107,109 +1107,109 @@ void JKQTPxyGraph::intSortData() } -bool JKQTPxGraphErrors::errorUsesColumn(int c) const +bool JKQTPXGraphErrors::errorUsesColumn(int c) const { return c==(xErrorColumn) || (c==xErrorColumnLower); } -bool JKQTPgraphErrors::errorUsesColumn(int /*c*/) const +bool JKQTPGraphErrors::errorUsesColumn(int /*c*/) const { return false; } -void JKQTPgraphErrors::setErrorColorFromGraphColor(QColor graphColor) +void JKQTPGraphErrors::setErrorColorFromGraphColor(QColor graphColor) { errorColor=graphColor.darker(); errorFillColor=graphColor.lighter(); //errorColor.setAlphaF(0.5); } -bool JKQTPyGraphErrors::errorUsesColumn(int c) const +bool JKQTPYGraphErrors::errorUsesColumn(int c) const { return (c==yErrorColumn) || (c==yErrorColumnLower); } -void JKQTPyGraphErrors::set_yErrorColumn(int __value) { +void JKQTPYGraphErrors::set_yErrorColumn(int __value) { if (this->yErrorColumn != __value) { this->yErrorColumn = __value; - if (yErrorColumn>=0 && yErrorStyle==JKQTPnoError) yErrorStyle=JKQTPerrorBars; + if (yErrorColumn>=0 && yErrorStyle==JKQTPNoError) yErrorStyle=JKQTPErrorBars; } } -void JKQTPyGraphErrors::set_yErrorColumnLower(int __value) { +void JKQTPYGraphErrors::set_yErrorColumnLower(int __value) { if (this->yErrorColumnLower != __value) { this->yErrorColumnLower = __value; - if (yErrorColumnLower>=0 && yErrorStyle==JKQTPnoError) yErrorStyle=JKQTPerrorBars; + if (yErrorColumnLower>=0 && yErrorStyle==JKQTPNoError) yErrorStyle=JKQTPErrorBars; } } -bool JKQTPxyGraphErrors::errorUsesColumn(int c) const +bool JKQTPXYGraphErrors::errorUsesColumn(int c) const { return (c==xErrorColumn)||(c==yErrorColumn)||(c==xErrorColumnLower)||(c==yErrorColumnLower); } -void JKQTPxyGraphErrors::set_xErrorColumn(int __value) { +void JKQTPXYGraphErrors::set_xErrorColumn(int __value) { if (this->xErrorColumn != __value) { this->xErrorColumn = __value; - if (xErrorColumn>=0 && xErrorStyle==JKQTPnoError) xErrorStyle=JKQTPerrorBars; + if (xErrorColumn>=0 && xErrorStyle==JKQTPNoError) xErrorStyle=JKQTPErrorBars; } } -void JKQTPxyGraphErrors::set_xErrorColumnLower(int __value) { +void JKQTPXYGraphErrors::set_xErrorColumnLower(int __value) { if (this->xErrorColumnLower != __value) { this->xErrorColumnLower = __value; - if (xErrorColumnLower>=0 && xErrorStyle==JKQTPnoError) xErrorStyle=JKQTPerrorBars; + if (xErrorColumnLower>=0 && xErrorStyle==JKQTPNoError) xErrorStyle=JKQTPErrorBars; } \ } -void JKQTPxyGraphErrors::set_yErrorColumn(int __value) { +void JKQTPXYGraphErrors::set_yErrorColumn(int __value) { if (this->yErrorColumn != __value) { this->yErrorColumn = __value; - if (yErrorColumn>=0 && yErrorStyle==JKQTPnoError) yErrorStyle=JKQTPerrorBars; + if (yErrorColumn>=0 && yErrorStyle==JKQTPNoError) yErrorStyle=JKQTPErrorBars; } } -void JKQTPxyGraphErrors::set_yErrorColumnLower(int __value) { +void JKQTPXYGraphErrors::set_yErrorColumnLower(int __value) { if (this->yErrorColumnLower != __value) { this->yErrorColumnLower = __value; - if (yErrorColumnLower>=0 && yErrorStyle==JKQTPnoError) yErrorStyle=JKQTPerrorBars; + if (yErrorColumnLower>=0 && yErrorStyle==JKQTPNoError) yErrorStyle=JKQTPErrorBars; } } -void JKQTPxyGraphErrors::set_xErrorColumn(size_t __value) +void JKQTPXYGraphErrors::set_xErrorColumn(size_t __value) { set_xErrorColumn(static_cast(__value)); } -void JKQTPxyGraphErrors::set_xErrorColumnLower(size_t __value) +void JKQTPXYGraphErrors::set_xErrorColumnLower(size_t __value) { set_xErrorColumnLower(static_cast(__value)); } -void JKQTPxyGraphErrors::set_yErrorColumn(size_t __value) +void JKQTPXYGraphErrors::set_yErrorColumn(size_t __value) { set_yErrorColumn(static_cast(__value)); } -void JKQTPxyGraphErrors::set_yErrorColumnLower(size_t __value) +void JKQTPXYGraphErrors::set_yErrorColumnLower(size_t __value) { set_yErrorColumnLower(static_cast(__value)); } -JKQTPplotObject::JKQTPplotObject(JKQtBasePlotter *parent): - JKQTPplotElement(parent) +JKQTPPlotObject::JKQTPPlotObject(JKQTBasePlotter *parent): + JKQTPPlotElement(parent) { } -JKQTPplotObject::JKQTPplotObject(JKQtPlotter *parent): - JKQTPplotElement(parent) +JKQTPPlotObject::JKQTPPlotObject(JKQTPLotter *parent): + JKQTPPlotElement(parent) { } -JKQTPplotObject::~JKQTPplotObject() +JKQTPPlotObject::~JKQTPPlotObject() { } diff --git a/lib/jkqtplotter/jkqtpgraphsbase.h b/lib/jkqtplotter/jkqtpgraphsbase.h index 68eb16cc9c..029fd3a3a0 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.h +++ b/lib/jkqtplotter/jkqtpgraphsbase.h @@ -35,15 +35,15 @@ #define jkqtpgraphsbase_H // forward declarations -class JKQtPlotter; -class JKQTPdatastore; +class JKQTPLotter; +class JKQTPDatastore; -/** \brief this virtual base class of every element, which is part of a JKQtPlotter plot and may appear in its key +/** \brief this virtual base class of every element, which is part of a JKQTPLotter plot and may appear in its key * (basically any type of graph, except overlay elements!) * \ingroup jkqtplotter_basegraphs * * Each possible graph is represented by a child of this class. So additional plots may be created by - * deriving new JKQTPgraph classes. To do so implement/overwrite these functions: + * deriving new JKQTPGraph classes. To do so implement/overwrite these functions: * - void draw(JKQTPEnhancedPainter& painter); * - void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect); * - bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero); @@ -58,16 +58,16 @@ class JKQTPdatastore; * . * */ -class LIB_EXPORT JKQTPplotElement: public QObject { +class LIB_EXPORT JKQTPPlotElement: public QObject { Q_OBJECT public: /** \brief class constructor */ - explicit JKQTPplotElement(JKQtBasePlotter* parent=nullptr); + explicit JKQTPPlotElement(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - explicit JKQTPplotElement(JKQtPlotter* parent); + explicit JKQTPPlotElement(JKQTPLotter* parent); /** \brief default wirtual destructor */ - virtual ~JKQTPplotElement() ; + virtual ~JKQTPPlotElement() ; /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter)=0; @@ -121,11 +121,11 @@ class LIB_EXPORT JKQTPplotElement: public QObject { } /** \brief returns the parent painter class */ - inline JKQtBasePlotter* getParent() { return parent; } + inline JKQTBasePlotter* getParent() { return parent; } /** \brief sets the parent painter class */ - virtual void setParent(JKQtBasePlotter* parent); + virtual void setParent(JKQTBasePlotter* parent); /** \brief sets the parent painter class */ - virtual void setParent(JKQtPlotter* parent); + virtual void setParent(JKQTPLotter* parent); /*! \brief if the graph plots outside the actual plot field of view (e.g. color bars, scale bars, ...) @@ -143,7 +143,7 @@ class LIB_EXPORT JKQTPplotElement: public QObject { protected: /** \brief the plotter object this object belongs to */ - JKQtBasePlotter* parent; + JKQTBasePlotter* parent; /** \brief title of the plot (for display in key!). If no title is supplied, no key entry is drawn. */ QString title; @@ -199,30 +199,30 @@ class LIB_EXPORT JKQTPplotElement: public QObject { }; /** \brief this virtual base class of the (data-column based) graphs, - * which are part of a JKQtPlotter plot and which use the coordinate system - * of the JKQtPlotter (i.e. the two coordinate axes get_xAxis() and get_yAxis()) + * which are part of a JKQTPLotter plot and which use the coordinate system + * of the JKQTPLotter (i.e. the two coordinate axes get_xAxis() and get_yAxis()) * 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). + * JKQTPLotter (i.e. using the axes JKQTPLott:xAxis and JKQTPLotter::yAxis as basis for the plotting). * * 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]. */ -class LIB_EXPORT JKQTPgraph: public JKQTPplotElement { +class LIB_EXPORT JKQTPGraph: public JKQTPPlotElement { Q_OBJECT public: /** \brief class constructor */ - explicit JKQTPgraph(JKQtBasePlotter* parent=nullptr); + explicit JKQTPGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - explicit JKQTPgraph(JKQtPlotter* parent); + explicit JKQTPGraph(JKQTPLotter* parent); /** \brief default wirtual destructor */ - virtual ~JKQTPgraph() ; + virtual ~JKQTPGraph() ; /*! \brief sets the property datarange_start to the specified \a __value. @@ -286,28 +286,28 @@ class LIB_EXPORT JKQTPgraph: public JKQTPplotElement { */ bool getDataMinMax(int column, double& minx, double& maxx, double& smallestGreaterZero); - friend class JKQTPgraphErrors; + friend class JKQTPGraphErrors; }; -/** \brief this is the virtual base class of all JKQTPplotElement's in a JKQtPlotter plot that +/** \brief this is the virtual base class of all JKQTPPlotElement's in a JKQTPLotter plot that * represent geometric forms or annotations. They have extended coordinate transform capabilities, because * in addition to using the plot coordinates, you can also choose to use different other * coordinate systems * \ingroup jkqtplotter_basegraphs * */ -class LIB_EXPORT JKQTPplotObject: public JKQTPplotElement { +class LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement { Q_OBJECT public: /** \brief class constructor */ - explicit JKQTPplotObject(JKQtBasePlotter* parent=nullptr); + explicit JKQTPPlotObject(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - explicit JKQTPplotObject(JKQtPlotter* parent); + explicit JKQTPPlotObject(JKQTPLotter* parent); /** \brief default wirtual destructor */ - virtual ~JKQTPplotObject() ; + virtual ~JKQTPPlotObject() ; protected: @@ -317,7 +317,7 @@ class LIB_EXPORT JKQTPplotObject: public JKQTPplotElement { -/*! \brief This virtual JKQTPgraph descendent may be used as base for all graphs that use at least two columns +/*! \brief This virtual JKQTPGraph descendent may be used as base for all graphs that use at least two columns that specify x and y coordinates for the single plot points. \ingroup jkqtplotter_basegraphs @@ -327,7 +327,7 @@ class LIB_EXPORT JKQTPplotObject: public JKQTPplotElement { . */ -class LIB_EXPORT JKQTPxyGraph: public JKQTPgraph { +class LIB_EXPORT JKQTPXYGraph: public JKQTPGraph { Q_OBJECT public: enum DataSortOrder { @@ -338,9 +338,9 @@ class LIB_EXPORT JKQTPxyGraph: public JKQTPgraph { /** \brief class constructor */ - JKQTPxyGraph(JKQtBasePlotter* parent=nullptr); + JKQTPXYGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPxyGraph(JKQtPlotter* parent); + JKQTPXYGraph(JKQTPLotter* parent); /** \brief get the maximum and minimum x-value of the graph * @@ -353,7 +353,7 @@ class LIB_EXPORT JKQTPxyGraph: public JKQTPgraph { */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int column) const override; /*! \brief sets the property xColumn to the specified \a __value. @@ -433,13 +433,13 @@ class LIB_EXPORT JKQTPxyGraph: public JKQTPgraph { }; -/*! \brief This virtual JKQTPgraph descendent may be used as base for all graphs that use at least one column +/*! \brief This virtual JKQTPGraph descendent may be used as base for all graphs that use at least one column of data \ingroup jkqtplotter_basegraphs */ -class LIB_EXPORT JKQTPsingleColumnGraph: public JKQTPgraph { +class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph { Q_OBJECT public: enum DataSortOrder { @@ -447,14 +447,14 @@ class LIB_EXPORT JKQTPsingleColumnGraph: public JKQTPgraph { Sorted=1 }; /** \brief class constructor */ - JKQTPsingleColumnGraph(JKQtBasePlotter* parent=nullptr); - JKQTPsingleColumnGraph(int dataColumn, JKQtBasePlotter* parent=nullptr); - JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style=Qt::SolidLine, double lineWidth=2.0, JKQtBasePlotter* parent=nullptr); - JKQTPsingleColumnGraph(JKQtPlotter* parent); - JKQTPsingleColumnGraph(int dataColumn, JKQtPlotter* parent); - JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQtPlotter* parent); - JKQTPsingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, JKQtPlotter* parent); - JKQTPsingleColumnGraph(int dataColumn, QColor color, JKQtPlotter* parent); + JKQTPSingleColumnGraph(JKQTBasePlotter* parent=nullptr); + JKQTPSingleColumnGraph(int dataColumn, JKQTBasePlotter* parent=nullptr); + JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style=Qt::SolidLine, double lineWidth=2.0, JKQTBasePlotter* parent=nullptr); + JKQTPSingleColumnGraph(JKQTPLotter* parent); + JKQTPSingleColumnGraph(int dataColumn, JKQTPLotter* parent); + JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, double lineWidth, JKQTPLotter* parent); + 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(); @@ -535,14 +535,14 @@ class LIB_EXPORT JKQTPsingleColumnGraph: public JKQTPgraph { /*! \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData
\see sortData for more information */ void set_sortData(int __value); - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: /** \brief the column that contains the datapoints */ int dataColumn; - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ @@ -581,17 +581,17 @@ class LIB_EXPORT JKQTPsingleColumnGraph: public JKQTPgraph { \ingroup jkqtplotter_basegraphserrors This class is meant to be used with multiple inheritance. I.e. if you implemented some kind of plot - you may derive an error plot class in which you will have to overwrite the JKQTPgraph::drawErrorsBefor() + you may derive an error plot class in which you will have to overwrite the JKQTPGraph::drawErrorsBefor() or drawErrorsAfter() so it calls the plotErrorIndicators() method from this class. In addition this class 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). */ -class LIB_EXPORT JKQTPgraphErrors { +class LIB_EXPORT JKQTPGraphErrors { public: /** \brief class contructor */ - JKQTPgraphErrors(QColor graphColor=QColor("black")); - virtual ~JKQTPgraphErrors(); + JKQTPGraphErrors(QColor graphColor=QColor("black")); + virtual ~JKQTPGraphErrors(); /*! \brief sets the property errorColor to the specified \a __value. \details Description of the parameter errorColor is:
\copybrief errorColor
@@ -698,37 +698,37 @@ 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; + * 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; /** \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 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); /** \brief this function can be used to set the color of the error indicators automatically * * return \c true and the colors to use, if applicable, the default implementation returns false */ - virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter& painter, JKQtBasePlotter* parent, JKQTPgraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPerrorPlotstyle xErrorStyle, JKQTPerrorPlotstyle yErrorStyle, int index, QColor& errorColor, QColor& errorFillColor); + virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int index, QColor& errorColor, QColor& errorFillColor); - virtual double getXErrorU(int i, JKQTPdatastore* ds) const; - virtual double getXErrorL(int i, JKQTPdatastore* ds) const; - virtual double getYErrorU(int i, JKQTPdatastore* ds) const; - virtual double getYErrorL(int i, JKQTPdatastore* ds) const; + virtual double getXErrorU(int i, JKQTPDatastore* ds) const; + virtual double getXErrorL(int i, JKQTPDatastore* ds) const; + virtual double getYErrorU(int i, JKQTPDatastore* ds) const; + virtual double getYErrorL(int i, JKQTPDatastore* ds) const; //** \brief plot a single error indicator */ - //void intPlotXYErrorIndicator(JKQTPEnhancedPainter& painter, double x, double xperror, double xmerror, double y, double yperror, double ymerror, JKQTPerrorPlotstyle xErrorStyle=JKQTPnoError, JKQTPerrorPlotstyle yErrorStyle=JKQTPnoError, double lastx=0, double lastxperror=0, double lastxmerror=0, double lasty=0, double lastyperror=0, double lastymerror=0); + //void intPlotXYErrorIndicator(JKQTPEnhancedPainter& painter, double x, double xperror, double xmerror, double y, double yperror, double ymerror, JKQTPErrorPlotstyle xErrorStyle=JKQTPNoError, JKQTPErrorPlotstyle yErrorStyle=JKQTPNoError, double lastx=0, double lastxperror=0, double lastxmerror=0, double lasty=0, double lastyperror=0, double lastymerror=0); }; -/*! \brief This class adds data fields for error indicators in x direction to a JKQTPgraph descendent. +/*! \brief This class adds data fields for error indicators in x direction to a JKQTPGraph descendent. \ingroup jkqtplotter_basegraphserrors - \see JKQTPgraphErrors + \see JKQTPGraphErrors */ -class LIB_EXPORT JKQTPxGraphErrors: public JKQTPgraphErrors { +class LIB_EXPORT JKQTPXGraphErrors: public JKQTPGraphErrors { public: /** \brief class contructor */ - JKQTPxGraphErrors(QColor graphColor=QColor("black")); + JKQTPXGraphErrors(QColor graphColor=QColor("black")); /*! \brief sets the property xErrorSymmetric to the specified \a __value. \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric
@@ -751,14 +751,14 @@ class LIB_EXPORT JKQTPxGraphErrors: public JKQTPgraphErrors { /*! \brief sets the property xErrorStyle to the specified \a __value. \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle
\see xErrorStyle for more information */ - inline virtual void set_xErrorStyle(const JKQTPerrorPlotstyle & __value) + inline virtual void set_xErrorStyle(const JKQTPErrorPlotstyle & __value) { this->xErrorStyle = __value; } /*! \brief returns the property xErrorStyle. \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle
\see xErrorStyle for more information */ - inline virtual JKQTPerrorPlotstyle get_xErrorStyle() const + inline virtual JKQTPErrorPlotstyle get_xErrorStyle() const { return this->xErrorStyle; } @@ -778,27 +778,27 @@ class LIB_EXPORT JKQTPxGraphErrors: public JKQTPgraphErrors { /** \brief indicates whether the x-errors are symmetric (from one column only) */ bool xErrorSymmetric; /** \brief how to draw the errors (if available) of the x-value */ - JKQTPerrorPlotstyle xErrorStyle; + JKQTPErrorPlotstyle xErrorStyle; /** \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, int datarange_start=-1, int datarange_end=-1, 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; + virtual double getXErrorU(int i, JKQTPDatastore* ds) const override; + virtual double getXErrorL(int i, JKQTPDatastore* ds) const override; }; /*! \brief This class adds data fields for error indicators in y direction to a class. \ingroup jkqtplotter_basegraphserrors - \see JKQTPgraphErrors + \see JKQTPGraphErrors */ -class LIB_EXPORT JKQTPyGraphErrors: public JKQTPgraphErrors { +class LIB_EXPORT JKQTPYGraphErrors: public JKQTPGraphErrors { public: /** \brief class contructor */ - JKQTPyGraphErrors(QColor graphColor=QColor("black")); + JKQTPYGraphErrors(QColor graphColor=QColor("black")); /*! \brief sets the property yErrorSymmetric to the specified \a __value. \details Description of the parameter yErrorSymmetric is:
\copybrief yErrorSymmetric
@@ -821,18 +821,18 @@ class LIB_EXPORT JKQTPyGraphErrors: public JKQTPgraphErrors { /*! \brief sets the property yErrorStyle to the specified \a __value. \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle
\see yErrorStyle for more information */ - inline virtual void set_yErrorStyle(const JKQTPerrorPlotstyle & __value) + inline virtual void set_yErrorStyle(const JKQTPErrorPlotstyle & __value) { this->yErrorStyle = __value; } /*! \brief returns the property yErrorStyle. \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle
\see yErrorStyle for more information */ - inline virtual JKQTPerrorPlotstyle get_yErrorStyle() const + inline virtual JKQTPErrorPlotstyle get_yErrorStyle() const { return this->yErrorStyle; } - /** \copydoc JKQTPgraphErrors::errorUsesColumn() */ + /** \copydoc JKQTPGraphErrors::errorUsesColumn() */ virtual bool errorUsesColumn(int c) const override; /** \brief set the column from which to read the error values for y-error indicators */ @@ -843,7 +843,7 @@ class LIB_EXPORT JKQTPyGraphErrors: public JKQTPgraphErrors { /** \brief the column that contains the error of the x-component of the datapoints */ int yErrorColumn; /** \brief how to draw the errors (if available) of the x-value */ - JKQTPerrorPlotstyle yErrorStyle; + JKQTPErrorPlotstyle yErrorStyle; /** \brief indicates whether the y-errors are symmetric (from one column only) */ bool yErrorSymmetric; /** \brief the column that contains the error of the y-component of the datapoints. This is used as the lower error length, if yErrorSymmetric \c ==false. */ @@ -851,22 +851,22 @@ 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, int datarange_start=-1, int datarange_end=-1, 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; + virtual double getYErrorU(int i, JKQTPDatastore* ds) const override; + virtual double getYErrorL(int i, JKQTPDatastore* ds) const override; }; /*! \brief This class adds data fields for error indicators in x and y direction to a class. \ingroup jkqtplotter_basegraphserrors - \see JKQTPgraphErrors + \see JKQTPGraphErrors */ -class LIB_EXPORT JKQTPxyGraphErrors: public JKQTPgraphErrors { +class LIB_EXPORT JKQTPXYGraphErrors: public JKQTPGraphErrors { public: /** \brief class contructor */ - JKQTPxyGraphErrors(QColor graphColor=QColor("black")); + JKQTPXYGraphErrors(QColor graphColor=QColor("black")); /*! \brief sets the property xErrorSymmetric to the specified \a __value. \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric
\see xErrorSymmetric for more information */ @@ -906,32 +906,32 @@ class LIB_EXPORT JKQTPxyGraphErrors: public JKQTPgraphErrors { /*! \brief sets the property yErrorStyle to the specified \a __value. \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle
\see yErrorStyle for more information */ - inline virtual void set_yErrorStyle(const JKQTPerrorPlotstyle & __value) + inline virtual void set_yErrorStyle(const JKQTPErrorPlotstyle & __value) { this->yErrorStyle = __value; } /*! \brief returns the property yErrorStyle. \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle
\see yErrorStyle for more information */ - inline virtual JKQTPerrorPlotstyle get_yErrorStyle() const + inline virtual JKQTPErrorPlotstyle get_yErrorStyle() const { return this->yErrorStyle; } /*! \brief sets the property xErrorStyle to the specified \a __value. \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle
\see xErrorStyle for more information */ - inline virtual void set_xErrorStyle(const JKQTPerrorPlotstyle & __value) + inline virtual void set_xErrorStyle(const JKQTPErrorPlotstyle & __value) { this->xErrorStyle = __value; } /*! \brief returns the property xErrorStyle. \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle
\see xErrorStyle for more information */ - inline virtual JKQTPerrorPlotstyle get_xErrorStyle() const + inline virtual JKQTPErrorPlotstyle get_xErrorStyle() const { return this->xErrorStyle; } - /** \copydoc JKQTPgraphErrors::errorUsesColumn() */ + /** \copydoc JKQTPGraphErrors::errorUsesColumn() */ virtual bool errorUsesColumn(int c) const override; /** \brief set the column from which to read the error values for x-error indicators */ @@ -955,11 +955,11 @@ class LIB_EXPORT JKQTPxyGraphErrors: public JKQTPgraphErrors { /** \brief the column that contains the error of the x-component of the datapoints */ int yErrorColumn; /** \brief how to draw the errors (if available) of the x-value */ - JKQTPerrorPlotstyle yErrorStyle; + JKQTPErrorPlotstyle yErrorStyle; /** \brief the column that contains the error of the x-component of the datapoints */ int xErrorColumn; /** \brief how to draw the errors (if available) of the x-value */ - JKQTPerrorPlotstyle xErrorStyle; + JKQTPErrorPlotstyle xErrorStyle; /** \brief indicates whether the x-errors are symmetric (from one column only) */ bool xErrorSymmetric; /** \brief indicates whether the y-errors are symmetric (from one column only) */ @@ -971,12 +971,12 @@ 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, int datarange_start=-1, int datarange_end=-1, 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; - virtual double getYErrorU(int i, JKQTPdatastore* ds) const override; - virtual double getYErrorL(int i, JKQTPdatastore* ds) const override; + virtual double getXErrorU(int i, JKQTPDatastore* ds) const override; + virtual double getXErrorL(int i, JKQTPDatastore* ds) const override; + virtual double getYErrorU(int i, JKQTPDatastore* ds) const override; + virtual double getYErrorL(int i, JKQTPDatastore* ds) const override; }; diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp index 7135a7036f..ca01e41438 100644 --- a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp +++ b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp @@ -37,8 +37,8 @@ -JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPBoxplotVerticalGraph::JKQTPBoxplotVerticalGraph(JKQTBasePlotter* parent): + JKQTPGraph(parent) { posColumn=-1; medianColumn=-1; @@ -53,7 +53,7 @@ JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtBasePlotter* parent): whiskerStyle=Qt::SolidLine; lineWidth=1; boxWidth=0.4; - meanSymbol=JKQTPplus; + meanSymbol=JKQTPPlus; meanSymbolWidth=1; meanSymbolSize=12; sortData=Unsorted; @@ -68,8 +68,8 @@ JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtBasePlotter* parent): } -JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtPlotter* parent): - JKQTPgraph(parent) +JKQTPBoxplotVerticalGraph::JKQTPBoxplotVerticalGraph(JKQTPLotter* parent): + JKQTPGraph(parent) { posColumn=-1; medianColumn=-1; @@ -84,7 +84,7 @@ JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtPlotter* parent): whiskerStyle=Qt::SolidLine; lineWidth=1; boxWidth=0.4; - meanSymbol=JKQTPplus; + meanSymbol=JKQTPPlus; meanSymbolWidth=1; meanSymbolSize=12; sortData=Unsorted; @@ -99,12 +99,12 @@ JKQTPboxplotVerticalGraph::JKQTPboxplotVerticalGraph(JKQtPlotter* parent): } -void JKQTPboxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPBoxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPboxplotVerticalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPBoxplotVerticalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -230,7 +230,7 @@ void JKQTPboxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { if (percentile25Column>=0 && percentile75Column>=0) painter.drawRect(QRectF(xmi, p75, fabs(xma-xmi), fabs(p75-p25))); if (medianColumn>=0) lines_p.append(QLineF(xmi+p.widthF()/2.0, median, xma-p.widthF()/2.0, median)); if (meanColumn>=0 && JKQTPIsOKFloat(mean)) { - JKQTPplotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); } @@ -250,7 +250,7 @@ void JKQTPboxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { } -bool JKQTPboxplotVerticalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBoxplotVerticalGraph::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { bool start=true; minx=0; maxx=0; @@ -259,7 +259,7 @@ bool JKQTPboxplotVerticalGraph::getXMinMax(double& minx, double& maxx, double& s if (posColumn<0) return false; if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(posColumn).getRows(); // interpret data ranges @@ -299,7 +299,7 @@ bool JKQTPboxplotVerticalGraph::getXMinMax(double& minx, double& maxx, double& s return !start; } -bool JKQTPboxplotVerticalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBoxplotVerticalGraph::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { bool start=true; miny=0; maxy=0; @@ -309,7 +309,7 @@ bool JKQTPboxplotVerticalGraph::getYMinMax(double& miny, double& maxy, double& s if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(medianColumn).getRows(); // interpret data ranges @@ -357,18 +357,18 @@ bool JKQTPboxplotVerticalGraph::getYMinMax(double& miny, double& maxy, double& s return !start; } -bool JKQTPboxplotVerticalGraph::usesColumn(int c) const +bool JKQTPBoxplotVerticalGraph::usesColumn(int c) const { return (c==meanColumn)||(c==posColumn)||(c==medianColumn)||(c==minColumn)||(c==maxColumn)||(c==percentile25Column)||(c==percentile75Column); } -void JKQTPboxplotVerticalGraph::set_sortData(int __value) { +void JKQTPBoxplotVerticalGraph::set_sortData(int __value) { sortData=(DataSortOrder)__value; if (__value>0) sortData=Sorted; } -void JKQTPboxplotVerticalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPBoxplotVerticalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); p.setJoinStyle(Qt::RoundJoin); @@ -407,14 +407,14 @@ void JKQTPboxplotVerticalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRe painter.restore(); } -QColor JKQTPboxplotVerticalGraph::getKeyLabelColor() { +QColor JKQTPBoxplotVerticalGraph::getKeyLabelColor() { return color; } -void JKQTPboxplotHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPBoxplotHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); p.setColor(color); @@ -454,7 +454,7 @@ void JKQTPboxplotHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, Q painter.restore(); } -bool JKQTPboxplotHorizontalGraph::getXMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBoxplotHorizontalGraph::getXMinMax(double& miny, double& maxy, double& smallestGreaterZero) { bool start=true; miny=0; maxy=0; @@ -464,7 +464,7 @@ bool JKQTPboxplotHorizontalGraph::getXMinMax(double& miny, double& maxy, double& if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(medianColumn).getRows(); // interpret data ranges @@ -511,7 +511,7 @@ bool JKQTPboxplotHorizontalGraph::getXMinMax(double& miny, double& maxy, double& return !start; } -bool JKQTPboxplotHorizontalGraph::getYMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBoxplotHorizontalGraph::getYMinMax(double& minx, double& maxx, double& smallestGreaterZero) { bool start=true; minx=0; maxx=0; @@ -520,7 +520,7 @@ bool JKQTPboxplotHorizontalGraph::getYMinMax(double& minx, double& maxx, double& if (posColumn<0) return false; if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(posColumn).getRows(); // interpret data ranges @@ -560,22 +560,22 @@ bool JKQTPboxplotHorizontalGraph::getYMinMax(double& minx, double& maxx, double& return !start; } -JKQTPboxplotHorizontalGraph::JKQTPboxplotHorizontalGraph(JKQtBasePlotter *parent): - JKQTPboxplotVerticalGraph(parent) +JKQTPBoxplotHorizontalGraph::JKQTPBoxplotHorizontalGraph(JKQTBasePlotter *parent): + JKQTPBoxplotVerticalGraph(parent) { } -JKQTPboxplotHorizontalGraph::JKQTPboxplotHorizontalGraph(JKQtPlotter *parent): - JKQTPboxplotVerticalGraph(parent) +JKQTPBoxplotHorizontalGraph::JKQTPBoxplotHorizontalGraph(JKQTPLotter *parent): + JKQTPBoxplotVerticalGraph(parent) { } -void JKQTPboxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPBoxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPboxplotHorizontalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPBoxplotHorizontalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -703,7 +703,7 @@ void JKQTPboxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { if (medianColumn>=0) lines_p.append(QLineF(median, ymi-p.widthF()/2.0, median, yma+p.widthF()/2.0)); if (meanColumn>=0 && JKQTPIsOKFloat(mean)) { - JKQTPplotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); } //first=true; @@ -741,8 +741,8 @@ void JKQTPboxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { -JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPBoxplotVerticalElement::JKQTPBoxplotVerticalElement(JKQTBasePlotter* parent): + JKQTPPlotObject(parent) { pos=0; median=0; @@ -759,7 +759,7 @@ JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtBasePlotter* parent whiskerStyle=Qt::SolidLine; lineWidth=1; boxWidth=0.4; - meanSymbol=JKQTPplus; + meanSymbol=JKQTPPlus; meanSymbolWidth=1; meanSymbolSize=12; @@ -772,8 +772,8 @@ JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtBasePlotter* parent } -JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtPlotter* parent): - JKQTPgraph(parent) +JKQTPBoxplotVerticalElement::JKQTPBoxplotVerticalElement(JKQTPLotter* parent): + JKQTPPlotObject(parent) { pos=0; median=0; @@ -790,7 +790,7 @@ JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtPlotter* parent): whiskerStyle=Qt::SolidLine; lineWidth=1; boxWidth=0.4; - meanSymbol=JKQTPplus; + meanSymbol=JKQTPPlus; meanSymbolWidth=1; meanSymbolSize=12; @@ -802,13 +802,13 @@ JKQTPboxplotVerticalElement::JKQTPboxplotVerticalElement(JKQtPlotter* parent): } } -void JKQTPboxplotVerticalElement::draw(JKQTPEnhancedPainter& painter) { +void JKQTPBoxplotVerticalElement::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPboxplotVerticalElement::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPBoxplotVerticalElement::draw"); #endif if (parent==nullptr) return; - drawErrorsBefore(painter); + //drawErrorsBefore(painter); painter.save(); @@ -871,18 +871,18 @@ void JKQTPboxplotVerticalElement::draw(JKQTPEnhancedPainter& painter) { if (drawMean) { double mean=transformY(this->mean); - JKQTPplotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); } } painter.restore(); - drawErrorsAfter(painter); + //drawErrorsAfter(painter); } -bool JKQTPboxplotVerticalElement::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBoxplotVerticalElement::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=0; maxx=0; smallestGreaterZero=0; @@ -901,7 +901,7 @@ bool JKQTPboxplotVerticalElement::getXMinMax(double& minx, double& maxx, double& return true; } -bool JKQTPboxplotVerticalElement::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBoxplotVerticalElement::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=0; maxy=0; smallestGreaterZero=0; @@ -937,7 +937,7 @@ bool JKQTPboxplotVerticalElement::getYMinMax(double& miny, double& maxy, double& } -void JKQTPboxplotVerticalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPBoxplotVerticalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); p.setColor(color); @@ -977,14 +977,14 @@ void JKQTPboxplotVerticalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, Q painter.restore(); } -QColor JKQTPboxplotVerticalElement::getKeyLabelColor() { +QColor JKQTPBoxplotVerticalElement::getKeyLabelColor() { return color; } -void JKQTPboxplotHorizontalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPBoxplotHorizontalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); p.setColor(color); @@ -1025,7 +1025,7 @@ void JKQTPboxplotHorizontalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, painter.restore(); } -bool JKQTPboxplotHorizontalElement::getXMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPBoxplotHorizontalElement::getXMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=0; maxy=0; smallestGreaterZero=0; @@ -1060,7 +1060,7 @@ bool JKQTPboxplotHorizontalElement::getXMinMax(double& miny, double& maxy, doubl return true; } -bool JKQTPboxplotHorizontalElement::getYMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPBoxplotHorizontalElement::getYMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=0; maxx=0; smallestGreaterZero=0; @@ -1079,23 +1079,23 @@ bool JKQTPboxplotHorizontalElement::getYMinMax(double& minx, double& maxx, doubl return true; } -JKQTPboxplotHorizontalElement::JKQTPboxplotHorizontalElement(JKQtBasePlotter *parent): - JKQTPboxplotVerticalElement(parent) +JKQTPBoxplotHorizontalElement::JKQTPBoxplotHorizontalElement(JKQTBasePlotter *parent): + JKQTPBoxplotVerticalElement(parent) { } -JKQTPboxplotHorizontalElement::JKQTPboxplotHorizontalElement(JKQtPlotter *parent): - JKQTPboxplotVerticalElement(parent) +JKQTPBoxplotHorizontalElement::JKQTPBoxplotHorizontalElement(JKQTPLotter *parent): + JKQTPBoxplotVerticalElement(parent) { } -void JKQTPboxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { +void JKQTPBoxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPboxplotHorizontalElement::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPBoxplotHorizontalElement::draw"); #endif if (parent==nullptr) return; - drawErrorsBefore(painter); + //drawErrorsBefore(painter); painter.save(); @@ -1159,13 +1159,13 @@ void JKQTPboxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { if (drawMean) { double mean=transformY(this->mean); - JKQTPplotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); } } painter.restore(); - drawErrorsAfter(painter); + //drawErrorsAfter(painter); } @@ -1173,7 +1173,7 @@ void JKQTPboxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { -QPen JKQTPboxplotVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPBoxplotVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -1183,7 +1183,7 @@ QPen JKQTPboxplotVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const return p; } -void JKQTPboxplotVerticalGraph::intSortData() +void JKQTPBoxplotVerticalGraph::intSortData() { sortedIndices.clear(); @@ -1191,7 +1191,7 @@ void JKQTPboxplotVerticalGraph::intSortData() if (parent==nullptr) return ; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(posColumn).getRows(); // interpret data ranges @@ -1211,7 +1211,7 @@ void JKQTPboxplotVerticalGraph::intSortData() QVector datas; - if (sortData==JKQTPboxplotVerticalGraph::Sorted) { + if (sortData==JKQTPBoxplotVerticalGraph::Sorted) { for (int i=0; iget(posColumn,i); @@ -1225,21 +1225,21 @@ void JKQTPboxplotVerticalGraph::intSortData() } } -QBrush JKQTPboxplotVerticalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPBoxplotVerticalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QBrush JKQTPboxplotVerticalElement::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPBoxplotVerticalElement::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPboxplotVerticalElement::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPBoxplotVerticalElement::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.h b/lib/jkqtplotter/jkqtpgraphsboxplot.h index 4efc41a174..8a64dfaff9 100644 --- a/lib/jkqtplotter/jkqtpgraphsboxplot.h +++ b/lib/jkqtplotter/jkqtpgraphsboxplot.h @@ -44,7 +44,7 @@ \image html plot_boxplotvertical.png */ -class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { +class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph { Q_OBJECT public: @@ -56,9 +56,9 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { /** \brief class constructor */ - JKQTPboxplotVerticalGraph(JKQtBasePlotter* parent=nullptr); + JKQTPBoxplotVerticalGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPboxplotVerticalGraph(JKQtPlotter* parent); + JKQTPBoxplotVerticalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); @@ -79,7 +79,7 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; /*! \brief sets the property sortData to the specified \a __value. @@ -312,14 +312,14 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { /*! \brief sets the property meanSymbol to the specified \a __value. \details Description of the parameter meanSymbol is:
\copybrief meanSymbol
\see meanSymbol for more information */ - inline virtual void set_meanSymbol(const JKQTPgraphSymbols & __value) + inline virtual void set_meanSymbol(const JKQTPGraphSymbols & __value) { this->meanSymbol = __value; } /*! \brief returns the property meanSymbol. \details Description of the parameter meanSymbol is:
\copybrief meanSymbol
\see meanSymbol for more information */ - inline virtual JKQTPgraphSymbols get_meanSymbol() const + inline virtual JKQTPGraphSymbols get_meanSymbol() const { return this->meanSymbol; } @@ -353,7 +353,7 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { } protected: - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief the column that contains the x-component of the datapoints */ @@ -384,7 +384,7 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { * if we only plot one box&whiskers then this is the width in plot coordinates */ double boxWidth; /** \brief which symbol to use for the mean */ - JKQTPgraphSymbols meanSymbol; + JKQTPGraphSymbols meanSymbol; /** \brief size (diameter in pixels) of the symbol for the mean */ double meanSymbolSize; /** \brief width (in pixels) of the lines used to plot the symbol for the mean */ @@ -411,14 +411,14 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { the x position is given in posColumn. All other data are given in the medianColumn, minColumn, maxColumn, percentile25Column and percentile75Column. - \image html plot_boxplothorizontal.png + \image html plot_boxplothoricontal.png */ -class LIB_EXPORT JKQTPboxplotHorizontalGraph: public JKQTPboxplotVerticalGraph { +class LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPboxplotHorizontalGraph(JKQtBasePlotter* parent=nullptr); - JKQTPboxplotHorizontalGraph(JKQtPlotter* parent); + JKQTPBoxplotHorizontalGraph(JKQTBasePlotter* parent=nullptr); + JKQTPBoxplotHorizontalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -446,21 +446,22 @@ class LIB_EXPORT JKQTPboxplotHorizontalGraph: public JKQTPboxplotVerticalGraph { /*! \brief This implements a vertical boxplot where the data is directly given to the - object and not stored in a column, as in JKQTPboxplotVerticalGraph + object and not stored in a column, as in JKQTPBoxplotVerticalGraph \ingroup jkqtplotter_statgraphs + \ingroup jkqtplotter_geoplots the x position is given in posColumn. All other data are given in the median, min, max, percentile25 and percentile75. - \image html plot_boxplotvertical.png + \image html plot_boxplotverticalelement.png */ -class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { +class LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject { Q_OBJECT public: /** \brief class constructor */ - JKQTPboxplotVerticalElement(JKQtBasePlotter* parent=nullptr); + JKQTPBoxplotVerticalElement(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPboxplotVerticalElement(JKQtPlotter* parent); + JKQTPBoxplotVerticalElement(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -666,14 +667,14 @@ class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { /*! \brief sets the property meanSymbol to the specified \a __value. \details Description of the parameter meanSymbol is:
\copybrief meanSymbol
\see meanSymbol for more information */ - inline virtual void set_meanSymbol(const JKQTPgraphSymbols & __value) + inline virtual void set_meanSymbol(const JKQTPGraphSymbols & __value) { this->meanSymbol = __value; } /*! \brief returns the property meanSymbol. \details Description of the parameter meanSymbol is:
\copybrief meanSymbol
\see meanSymbol for more information */ - inline virtual JKQTPgraphSymbols get_meanSymbol() const + inline virtual JKQTPGraphSymbols get_meanSymbol() const { return this->meanSymbol; } @@ -749,7 +750,7 @@ class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { } protected: - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief the column that contains the x-component of the datapoints */ @@ -785,7 +786,7 @@ class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { /** \brief width of box in plot coordinates */ double boxWidth; /** \brief which symbol to use for the mean */ - JKQTPgraphSymbols meanSymbol; + JKQTPGraphSymbols meanSymbol; /** \brief size (diameter in pixels) of the symbol for the mean */ double meanSymbolSize; /** \brief width (in pixels) of the lines used to plot the symbol for the mean */ @@ -797,21 +798,22 @@ class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { /*! \brief This implements a horizontal boxplot where the data is directly given to the - object and not stored in a column, as in JKQTPboxplotVerticalGraph + object and not stored in a column, as in JKQTPBoxplotVerticalGraph \ingroup jkqtplotter_statgraphs + \ingroup jkqtplotter_geoplots the x position is given in pos. All other data are given in the median, min, max, percentile25 and percentile75. - \image html plot_boxplothorizontal.png + \image html plot_boxplothorizontalelement.png */ -class LIB_EXPORT JKQTPboxplotHorizontalElement: public JKQTPboxplotVerticalElement { +class LIB_EXPORT JKQTPBoxplotHorizontalElement: public JKQTPBoxplotVerticalElement { Q_OBJECT public: /** \brief class constructor */ - JKQTPboxplotHorizontalElement(JKQtBasePlotter* parent=nullptr); + JKQTPBoxplotHorizontalElement(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPboxplotHorizontalElement(JKQtPlotter* parent); + JKQTPBoxplotHorizontalElement(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp index d73b1c2d8a..5aa38fe5dd 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp @@ -34,8 +34,8 @@ -JKQTPxFunctionLineGraph::JKQTPxFunctionLineGraph(JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPXFunctionLineGraph::JKQTPXFunctionLineGraph(JKQTBasePlotter* parent): + JKQTPGraph(parent) { functionType=SpecialFunction::UserFunction; color=QColor("red"); @@ -81,8 +81,8 @@ JKQTPxFunctionLineGraph::JKQTPxFunctionLineGraph(JKQtBasePlotter* parent): errorFillColor.setAlphaF(0.5); } -JKQTPxFunctionLineGraph::JKQTPxFunctionLineGraph(JKQtPlotter* parent): - JKQTPgraph(parent) +JKQTPXFunctionLineGraph::JKQTPXFunctionLineGraph(JKQTPLotter* parent): + JKQTPGraph(parent) { functionType=SpecialFunction::UserFunction; color=QColor("red"); @@ -129,11 +129,11 @@ JKQTPxFunctionLineGraph::JKQTPxFunctionLineGraph(JKQtPlotter* parent): } -JKQTPxFunctionLineGraph::~JKQTPxFunctionLineGraph() { +JKQTPXFunctionLineGraph::~JKQTPXFunctionLineGraph() { clearData(); } -void JKQTPxFunctionLineGraph::clearData() { +void JKQTPXFunctionLineGraph::clearData() { while (data!=nullptr) { doublePair* d=data; data=data->next; @@ -142,7 +142,7 @@ void JKQTPxFunctionLineGraph::clearData() { data=nullptr; } -void JKQTPxFunctionLineGraph::set_plotFunction(const jkqtpPlotFunctionType &__value) +void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpPlotFunctionType &__value) { simplePlotFunction=jkqtpSimplePlotFunctionType(); plotFunction = __value; @@ -151,7 +151,7 @@ void JKQTPxFunctionLineGraph::set_plotFunction(const jkqtpPlotFunctionType &__va clearData(); } -void JKQTPxFunctionLineGraph::set_plotFunction(const jkqtpSimplePlotFunctionType &__value) +void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpSimplePlotFunctionType &__value) { plotFunction=jkqtpPlotFunctionType(); simplePlotFunction=__value; @@ -160,7 +160,7 @@ void JKQTPxFunctionLineGraph::set_plotFunction(const jkqtpSimplePlotFunctionType clearData(); } -void JKQTPxFunctionLineGraph::set_plotFunction(jkqtpPlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpPlotFunctionType &&__value) { simplePlotFunction=jkqtpSimplePlotFunctionType(); plotFunction = std::move(__value); @@ -168,7 +168,7 @@ void JKQTPxFunctionLineGraph::set_plotFunction(jkqtpPlotFunctionType &&__value) clearData(); } -void JKQTPxFunctionLineGraph::set_plotFunction(jkqtpSimplePlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpSimplePlotFunctionType &&__value) { plotFunction=jkqtpPlotFunctionType(); simplePlotFunction=std::move(__value); @@ -177,18 +177,18 @@ void JKQTPxFunctionLineGraph::set_plotFunction(jkqtpSimplePlotFunctionType &&__v clearData(); } -jkqtpPlotFunctionType JKQTPxFunctionLineGraph::get_plotFunction() const +jkqtpPlotFunctionType JKQTPXFunctionLineGraph::get_plotFunction() const { return plotFunction; } -jkqtpSimplePlotFunctionType JKQTPxFunctionLineGraph::get_simplePlotFunction() const +jkqtpSimplePlotFunctionType JKQTPXFunctionLineGraph::get_simplePlotFunction() const { return simplePlotFunction; } -void JKQTPxFunctionLineGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPXFunctionLineGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); p.setJoinStyle(Qt::RoundJoin); @@ -208,23 +208,23 @@ void JKQTPxFunctionLineGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRect painter.restore(); } -QColor JKQTPxFunctionLineGraph::getKeyLabelColor() { +QColor JKQTPXFunctionLineGraph::getKeyLabelColor() { return color; } -bool JKQTPxFunctionLineGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) +bool JKQTPXFunctionLineGraph::getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) { smallestGreaterZero=minx=maxx=0; return false; } -bool JKQTPxFunctionLineGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) +bool JKQTPXFunctionLineGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { smallestGreaterZero=miny=maxy=0; return false; } -void JKQTPxFunctionLineGraph::createPlotData(bool collectParams) { +void JKQTPXFunctionLineGraph::createPlotData(bool collectParams) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaat(QString("JKQTPxFunctionLineGraph[%1]::createPlotData()").arg(title)); + JKQTPAutoOutputTimer jkaat(QString("JKQTPXFunctionLineGraph[%1]::createPlotData()").arg(title)); #endif clearData(); if (collectParams) collectParameters(); @@ -284,11 +284,11 @@ void JKQTPxFunctionLineGraph::createPlotData(bool collectParams) { } -void JKQTPxFunctionLineGraph::collectParameters() +void JKQTPXFunctionLineGraph::collectParameters() { if (parent && parameterColumn>=0) { iparams.clear(); - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(parameterColumn).getRows(); @@ -311,7 +311,7 @@ void JKQTPxFunctionLineGraph::collectParameters() } if (parent && errorParameterColumn>=0) { ierrorparams.clear(); - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; int imax=datastore->getColumn(errorParameterColumn).getRows(); @@ -329,7 +329,7 @@ void JKQTPxFunctionLineGraph::collectParameters() } } -void JKQTPxFunctionLineGraph::refine(doublePair* a, doublePair* b, unsigned int degree) { +void JKQTPXFunctionLineGraph::refine(doublePair* a, doublePair* b, unsigned int degree) { if (degree>=maxRefinementDegree) return; double ax=transformX(a->x); double af=transformX(a->f); @@ -367,12 +367,12 @@ void JKQTPxFunctionLineGraph::refine(doublePair* a, doublePair* b, unsigned int } -void JKQTPxFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPXFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPxFunctionLineGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPXFunctionLineGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; //qDebug()<<"start plot\n"; @@ -525,7 +525,7 @@ void JKQTPxFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { double x=transformX(xv); double y=transformY(yv); - JKQTPplotSymbol(painter, x, y, JKQTPcross, 6,1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); + JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6,1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); } d=d->next; } @@ -550,16 +550,16 @@ void JKQTPxFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { -JKQTPyFunctionLineGraph::JKQTPyFunctionLineGraph(JKQtBasePlotter *parent):JKQTPxFunctionLineGraph(parent) {} +JKQTPYFunctionLineGraph::JKQTPYFunctionLineGraph(JKQTBasePlotter *parent):JKQTPXFunctionLineGraph(parent) {} -JKQTPyFunctionLineGraph::JKQTPyFunctionLineGraph(JKQtPlotter *parent):JKQTPxFunctionLineGraph(parent) {} +JKQTPYFunctionLineGraph::JKQTPYFunctionLineGraph(JKQTPLotter *parent):JKQTPXFunctionLineGraph(parent) {} -void JKQTPyFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPYFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPyFunctionLineGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPYFunctionLineGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; //std::cout<<"start plot\n"; @@ -705,7 +705,7 @@ void JKQTPyFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { double x=transformX(xv); double y=transformY(yv); - JKQTPplotSymbol(painter, x, y, JKQTPcross, 6, 1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); + JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6, 1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); } d=d->next; } @@ -715,7 +715,7 @@ void JKQTPyFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { } -void JKQTPyFunctionLineGraph::createPlotData(bool collectParams) { +void JKQTPYFunctionLineGraph::createPlotData(bool collectParams) { clearData(); if (collectParams) collectParameters(); @@ -755,14 +755,14 @@ void JKQTPyFunctionLineGraph::createPlotData(bool collectParams) { -QBrush JKQTPxFunctionLineGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPXFunctionLineGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -QPen JKQTPxFunctionLineGraph::getLinePen(JKQTPEnhancedPainter &painter) const { +QPen JKQTPXFunctionLineGraph::getLinePen(JKQTPEnhancedPainter &painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -773,14 +773,14 @@ QPen JKQTPxFunctionLineGraph::getLinePen(JKQTPEnhancedPainter &painter) const { return p; } -QBrush JKQTPxFunctionLineGraph::getErrorBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPXFunctionLineGraph::getErrorBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(errorFillColor); b.setStyle(errorFillStyle); return b; } -QPen JKQTPxFunctionLineGraph::getErrorLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPXFunctionLineGraph::getErrorLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(errorColor); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*errorLineWidth))); @@ -792,58 +792,58 @@ QPen JKQTPxFunctionLineGraph::getErrorLinePen(JKQTPEnhancedPainter& painter) con } -void JKQTPxFunctionLineGraph::set_params(const QVector ¶ms) +void JKQTPXFunctionLineGraph::set_params(const QVector ¶ms) { iparams=params; set_params(&iparams); } -void JKQTPxFunctionLineGraph::set_copiedParams(const double *params, int N) +void JKQTPXFunctionLineGraph::set_copiedParams(const double *params, int N) { QVector v; for (int i=0; i p; p< p; p< p; p< p; p< p; p< &errorParams) +void JKQTPXFunctionLineGraph::set_errorParams(const QVector &errorParams) { ierrorparams=errorParams; set_errorParams(&ierrorparams); } -void JKQTPxFunctionLineGraph::setSpecialFunction(JKQTPxFunctionLineGraph::SpecialFunction function) +void JKQTPXFunctionLineGraph::setSpecialFunction(JKQTPXFunctionLineGraph::SpecialFunction function) { - if (function==JKQTPxFunctionLineGraph::Polynomial) { + if (function==JKQTPXFunctionLineGraph::Polynomial) { set_plotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); @@ -859,7 +859,7 @@ void JKQTPxFunctionLineGraph::setSpecialFunction(JKQTPxFunctionLineGraph::Specia return res; }); } - else if (function==JKQTPxFunctionLineGraph::Exponential) set_plotFunction([](double x, void* param) { + else if (function==JKQTPXFunctionLineGraph::Exponential) set_plotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); if (d) { @@ -871,7 +871,7 @@ void JKQTPxFunctionLineGraph::setSpecialFunction(JKQTPxFunctionLineGraph::Specia } return res; }); - else if (function==JKQTPxFunctionLineGraph::PowerLaw) set_plotFunction([](double x, void* param) { + else if (function==JKQTPXFunctionLineGraph::PowerLaw) set_plotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); if (d) { @@ -889,56 +889,56 @@ void JKQTPxFunctionLineGraph::setSpecialFunction(JKQTPxFunctionLineGraph::Specia else throw std::runtime_error("unknown special function type"); } -JKQTPxFunctionLineGraph::SpecialFunction JKQTPxFunctionLineGraph::getFunctionType() const +JKQTPXFunctionLineGraph::SpecialFunction JKQTPXFunctionLineGraph::getFunctionType() const { return functionType; } -QVector JKQTPxFunctionLineGraph::get_internalParams() const { +QVector JKQTPXFunctionLineGraph::get_internalParams() const { return iparams; } -QVector JKQTPxFunctionLineGraph::get_internalErrorParams() const { +QVector JKQTPXFunctionLineGraph::get_internalErrorParams() const { return ierrorparams; } -void JKQTPxFunctionLineGraph::set_errorPlotFunction(const jkqtpPlotFunctionType &__value) +void JKQTPXFunctionLineGraph::set_errorPlotFunction(const jkqtpPlotFunctionType &__value) { errorSimplePlotFunction=jkqtpSimplePlotFunctionType(); errorPlotFunction=__value; clearData(); } -void JKQTPxFunctionLineGraph::set_errorPlotFunction(jkqtpPlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::set_errorPlotFunction(jkqtpPlotFunctionType &&__value) { errorSimplePlotFunction=jkqtpSimplePlotFunctionType(); errorPlotFunction = std::move(__value); clearData(); } -jkqtpPlotFunctionType JKQTPxFunctionLineGraph::get_errorPlotFunction() const +jkqtpPlotFunctionType JKQTPXFunctionLineGraph::get_errorPlotFunction() const { return errorPlotFunction; } -void JKQTPxFunctionLineGraph::set_errorPlotFunction(const jkqtpSimplePlotFunctionType &__value) +void JKQTPXFunctionLineGraph::set_errorPlotFunction(const jkqtpSimplePlotFunctionType &__value) { errorPlotFunction=jkqtpPlotFunctionType(); errorSimplePlotFunction=__value; clearData(); } -void JKQTPxFunctionLineGraph::set_errorPlotFunction(jkqtpSimplePlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::set_errorPlotFunction(jkqtpSimplePlotFunctionType &&__value) { errorPlotFunction=jkqtpPlotFunctionType(); errorSimplePlotFunction = std::move(__value); clearData(); } -jkqtpSimplePlotFunctionType JKQTPxFunctionLineGraph::get_errorSimplePlotFunction() const +jkqtpSimplePlotFunctionType JKQTPXFunctionLineGraph::get_errorSimplePlotFunction() const { return errorSimplePlotFunction; } -bool JKQTPxFunctionLineGraph::usesColumn(int c) const +bool JKQTPXFunctionLineGraph::usesColumn(int c) const { return (c==parameterColumn)||(c==errorParameterColumn); } diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h index 720dfb31b3..7e8ceeefed 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h @@ -39,8 +39,8 @@ /*! \brief type of functions that may be plottet \ingroup jkqtplotter_functiongraphs - This is the type of functions \f$ y=f(x, \vec{p}) \f$ that may be plottet by JKQTPxFunctionLineGraph - and JKQTPyFunctionLineGraph. It is possible to supply parameters \f$ \vec{p} \f$ to the function that + This is the type of functions \f$ y=f(x, \vec{p}) \f$ that may be plottet by JKQTPXFunctionLineGraph + and JKQTPYFunctionLineGraph. It is possible to supply parameters \f$ \vec{p} \f$ to the function that influence its result. Parameters are given as a pointer to some memory location. The function has to know on its own how to interpret these. */ @@ -49,8 +49,8 @@ typedef std::function jkqtpPlotFunctionType; /*! \brief simplified type of functions (without parameters) that may be plottet \ingroup jkqtplotter_functiongraphs - This is the type of functions \f$ y=f(x) \f$ that may be plottet by JKQTPxFunctionLineGraph - and JKQTPyFunctionLineGraph. + This is the type of functions \f$ y=f(x) \f$ that may be plottet by JKQTPXFunctionLineGraph + and JKQTPYFunctionLineGraph. */ typedef std::function jkqtpSimplePlotFunctionType; @@ -69,7 +69,7 @@ typedef std::function jkqtpSimplePlotFunctionType; the following image \image html plot_functionplots.png */ -class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { +class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph { Q_OBJECT public: @@ -83,13 +83,13 @@ class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { }; /** \brief class constructor */ - JKQTPxFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + JKQTPXFunctionLineGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPxFunctionLineGraph(JKQtPlotter* parent); + JKQTPXFunctionLineGraph(JKQTPLotter* parent); /** \brief class destructor */ - virtual ~JKQTPxFunctionLineGraph(); + virtual ~JKQTPXFunctionLineGraph(); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -518,7 +518,7 @@ class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { return this->errorLineWidth; } - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; @@ -527,7 +527,7 @@ class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { /** \brief returns, which special function is set (or if any is set) */ SpecialFunction getFunctionType() const; protected: - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; struct doublePair { @@ -624,13 +624,13 @@ class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { \ingroup jkqtplotter_functiongraphs */ -class LIB_EXPORT JKQTPyFunctionLineGraph: public JKQTPxFunctionLineGraph { +class LIB_EXPORT JKQTPYFunctionLineGraph: public JKQTPXFunctionLineGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPyFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + JKQTPYFunctionLineGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPyFunctionLineGraph(JKQtPlotter* parent); + JKQTPYFunctionLineGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp index c70815a654..16435cd6e4 100644 --- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp +++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp @@ -36,8 +36,8 @@ -JKQTPfilledCurveXGraph::JKQTPfilledCurveXGraph(JKQtBasePlotter* parent): - JKQTPxyGraph(parent) +JKQTPFilledCurveXGraph::JKQTPFilledCurveXGraph(JKQTBasePlotter* parent): + JKQTPXYGraph(parent) { baseline=0.0; drawSelectionLine=false; @@ -59,8 +59,8 @@ JKQTPfilledCurveXGraph::JKQTPfilledCurveXGraph(JKQtBasePlotter* parent): } } -JKQTPfilledCurveXGraph::JKQTPfilledCurveXGraph(JKQtPlotter *parent): - JKQTPxyGraph(parent) +JKQTPFilledCurveXGraph::JKQTPFilledCurveXGraph(JKQTPLotter *parent): + JKQTPXYGraph(parent) { baseline=0.0; drawSelectionLine=false; @@ -82,12 +82,12 @@ JKQTPfilledCurveXGraph::JKQTPfilledCurveXGraph(JKQtPlotter *parent): } } -void JKQTPfilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPfilledCurveXGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPFilledCurveXGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -210,7 +210,7 @@ void JKQTPfilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) { drawErrorsAfter(painter); } -void JKQTPfilledCurveXGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPFilledCurveXGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); QPen p=painter.pen(); QPen np(Qt::NoPen); @@ -229,7 +229,7 @@ void JKQTPfilledCurveXGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF painter.restore(); } -QColor JKQTPfilledCurveXGraph::getKeyLabelColor() { +QColor JKQTPFilledCurveXGraph::getKeyLabelColor() { return color; } @@ -246,23 +246,23 @@ QColor JKQTPfilledCurveXGraph::getKeyLabelColor() { -JKQTPfilledCurveYGraph::JKQTPfilledCurveYGraph(JKQtBasePlotter* parent): - JKQTPfilledCurveXGraph(parent) +JKQTPFilledCurveYGraph::JKQTPFilledCurveYGraph(JKQTBasePlotter* parent): + JKQTPFilledCurveXGraph(parent) { } -JKQTPfilledCurveYGraph::JKQTPfilledCurveYGraph(JKQtPlotter *parent): - JKQTPfilledCurveXGraph(parent) +JKQTPFilledCurveYGraph::JKQTPFilledCurveYGraph(JKQTPLotter *parent): + JKQTPFilledCurveXGraph(parent) { } -void JKQTPfilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPfilledCurveYGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPFilledCurveYGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -391,7 +391,7 @@ void JKQTPfilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { -QPen JKQTPfilledCurveXGraph::getLinePen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPFilledCurveXGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -402,7 +402,7 @@ QPen JKQTPfilledCurveXGraph::getLinePen(JKQTPEnhancedPainter& painter) const { } -QBrush JKQTPfilledCurveXGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { +QBrush JKQTPFilledCurveXGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); @@ -410,58 +410,58 @@ QBrush JKQTPfilledCurveXGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const } -JKQTPfilledCurveXErrorGraph::JKQTPfilledCurveXErrorGraph(JKQtBasePlotter *parent): - JKQTPfilledCurveXGraph(parent), JKQTPyGraphErrors() +JKQTPFilledCurveXErrorGraph::JKQTPFilledCurveXErrorGraph(JKQTBasePlotter *parent): + JKQTPFilledCurveXGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPfilledCurveXErrorGraph::JKQTPfilledCurveXErrorGraph(JKQtPlotter *parent): - JKQTPfilledCurveXGraph(parent), JKQTPyGraphErrors() +JKQTPFilledCurveXErrorGraph::JKQTPFilledCurveXErrorGraph(JKQTPLotter *parent): + JKQTPFilledCurveXGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPfilledCurveXErrorGraph::usesColumn(int c) const +bool JKQTPFilledCurveXErrorGraph::usesColumn(int c) const { - return JKQTPfilledCurveXGraph::usesColumn(c)|| JKQTPyGraphErrors::errorUsesColumn(c); + return JKQTPFilledCurveXGraph::usesColumn(c)|| JKQTPYGraphErrors::errorUsesColumn(c); } -void JKQTPfilledCurveXErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPFilledCurveXErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } -JKQTPfilledCurveYErrorGraph::JKQTPfilledCurveYErrorGraph(JKQtBasePlotter *parent): - JKQTPfilledCurveYGraph(parent), JKQTPxGraphErrors() +JKQTPFilledCurveYErrorGraph::JKQTPFilledCurveYErrorGraph(JKQTBasePlotter *parent): + JKQTPFilledCurveYGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPfilledCurveYErrorGraph::JKQTPfilledCurveYErrorGraph(JKQtPlotter *parent): - JKQTPfilledCurveYGraph(parent), JKQTPxGraphErrors() +JKQTPFilledCurveYErrorGraph::JKQTPFilledCurveYErrorGraph(JKQTPLotter *parent): + JKQTPFilledCurveYGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPfilledCurveYErrorGraph::usesColumn(int c) const +bool JKQTPFilledCurveYErrorGraph::usesColumn(int c) const { - return JKQTPfilledCurveYGraph::usesColumn(c)|| JKQTPxGraphErrors::errorUsesColumn(c); + return JKQTPFilledCurveYGraph::usesColumn(c)|| JKQTPXGraphErrors::errorUsesColumn(c); } -void JKQTPfilledCurveYErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPFilledCurveYErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } -JKQTPfilledVerticalRangeGraph::JKQTPfilledVerticalRangeGraph(JKQtBasePlotter *parent): - JKQTPxyGraph(parent) +JKQTPFilledVerticalRangeGraph::JKQTPFilledVerticalRangeGraph(JKQTBasePlotter *parent): + JKQTPXYGraph(parent) { drawSelectionLine=false; selectionLineColor=Qt::transparent; @@ -482,8 +482,8 @@ JKQTPfilledVerticalRangeGraph::JKQTPfilledVerticalRangeGraph(JKQtBasePlotter *pa } } -JKQTPfilledVerticalRangeGraph::JKQTPfilledVerticalRangeGraph(JKQtPlotter *parent): - JKQTPxyGraph(parent) +JKQTPFilledVerticalRangeGraph::JKQTPFilledVerticalRangeGraph(JKQTPLotter *parent): + JKQTPXYGraph(parent) { drawSelectionLine=false; selectionLineColor=Qt::transparent; @@ -504,7 +504,7 @@ JKQTPfilledVerticalRangeGraph::JKQTPfilledVerticalRangeGraph(JKQtPlotter *parent } } -bool JKQTPfilledVerticalRangeGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) +bool JKQTPFilledVerticalRangeGraph::getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) { bool start=true; miny=0; @@ -513,7 +513,7 @@ bool JKQTPfilledVerticalRangeGraph::getYMinMax(double &miny, double &maxy, doubl if (parent==nullptr) return false; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); 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 @@ -552,18 +552,18 @@ bool JKQTPfilledVerticalRangeGraph::getYMinMax(double &miny, double &maxy, doubl return !start; } -bool JKQTPfilledVerticalRangeGraph::usesColumn(int column) const +bool JKQTPFilledVerticalRangeGraph::usesColumn(int column) const { - return JKQTPxyGraph::usesColumn(column)||(column==yColumn2); + return JKQTPXYGraph::usesColumn(column)||(column==yColumn2); } -void JKQTPfilledVerticalRangeGraph::draw(JKQTPEnhancedPainter &painter) +void JKQTPFilledVerticalRangeGraph::draw(JKQTPEnhancedPainter &painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPfilledCurveXGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPFilledCurveXGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -657,7 +657,7 @@ void JKQTPfilledVerticalRangeGraph::draw(JKQTPEnhancedPainter &painter) drawErrorsAfter(painter); } -void JKQTPfilledVerticalRangeGraph::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) +void JKQTPFilledVerticalRangeGraph::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) { painter.save(); QRectF r=rect; @@ -671,12 +671,12 @@ void JKQTPfilledVerticalRangeGraph::drawKeyMarker(JKQTPEnhancedPainter &painter, painter.restore(); } -QColor JKQTPfilledVerticalRangeGraph::getKeyLabelColor() +QColor JKQTPFilledVerticalRangeGraph::getKeyLabelColor() { return color; } -QBrush JKQTPfilledVerticalRangeGraph::getBrush(JKQTPEnhancedPainter &/*painter*/) const +QBrush JKQTPFilledVerticalRangeGraph::getBrush(JKQTPEnhancedPainter &/*painter*/) const { QBrush b; b.setColor(fillColor); @@ -684,7 +684,7 @@ QBrush JKQTPfilledVerticalRangeGraph::getBrush(JKQTPEnhancedPainter &/*painter*/ return b; } -QPen JKQTPfilledVerticalRangeGraph::getLinePen(JKQTPEnhancedPainter &painter) const +QPen JKQTPFilledVerticalRangeGraph::getLinePen(JKQTPEnhancedPainter &painter) const { QPen p; p.setColor(color); diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h index 65b9dff9c3..123216e169 100644 --- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h +++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h @@ -33,13 +33,13 @@ \image html plot_filledcurvexerrorplots.png */ -class LIB_EXPORT JKQTPfilledCurveXGraph: public JKQTPxyGraph { +class LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPXYGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPfilledCurveXGraph(JKQtBasePlotter* parent=nullptr); + JKQTPFilledCurveXGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPfilledCurveXGraph(JKQtPlotter* parent); + JKQTPFilledCurveXGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -183,7 +183,7 @@ class LIB_EXPORT JKQTPfilledCurveXGraph: public JKQTPxyGraph { /** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */ QColor selectionLineColor; - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ @@ -212,14 +212,14 @@ class LIB_EXPORT JKQTPfilledCurveXGraph: public JKQTPxyGraph { \image html plot_filledcurvexerrorplots.png */ -class LIB_EXPORT JKQTPfilledCurveXErrorGraph: public JKQTPfilledCurveXGraph, public JKQTPyGraphErrors { +class LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurveXGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPfilledCurveXErrorGraph(JKQtBasePlotter* parent=nullptr); + JKQTPFilledCurveXErrorGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPfilledCurveXErrorGraph(JKQtPlotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + JKQTPFilledCurveXErrorGraph(JKQTPLotter* parent); + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: @@ -238,13 +238,13 @@ class LIB_EXPORT JKQTPfilledCurveXErrorGraph: public JKQTPfilledCurveXGraph, pub \image html plot_filledcurvexplots.png */ -class LIB_EXPORT JKQTPfilledCurveYGraph: public JKQTPfilledCurveXGraph { +class LIB_EXPORT JKQTPFilledCurveYGraph: public JKQTPFilledCurveXGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPfilledCurveYGraph(JKQtBasePlotter* parent=nullptr); + JKQTPFilledCurveYGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPfilledCurveYGraph(JKQtPlotter* parent); + JKQTPFilledCurveYGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -257,13 +257,13 @@ class LIB_EXPORT JKQTPfilledCurveYGraph: public JKQTPfilledCurveXGraph { \image html plot_filledcurveyerrorplots.png */ -class LIB_EXPORT JKQTPfilledCurveYErrorGraph: public JKQTPfilledCurveYGraph, public JKQTPxGraphErrors { +class LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurveYGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPfilledCurveYErrorGraph(JKQtBasePlotter* parent=nullptr); - JKQTPfilledCurveYErrorGraph(JKQtPlotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + JKQTPFilledCurveYErrorGraph(JKQTBasePlotter* parent=nullptr); + JKQTPFilledCurveYErrorGraph(JKQTPLotter* parent); + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: @@ -282,25 +282,25 @@ class LIB_EXPORT JKQTPfilledCurveYErrorGraph: public JKQTPfilledCurveYGraph, pub \ingroup jkqtplotter_linesymbolgraphs With set_drawlines(false): - \image html JKQTPfilledVerticalRangeGraph.png + \image html JKQTPFilledVerticalRangeGraph.png With set_drawlines(true): - \image html JKQTPfilledVerticalRangeGraph_WithLines.png + \image html JKQTPFilledVerticalRangeGraph_WithLines.png */ -class LIB_EXPORT JKQTPfilledVerticalRangeGraph: public JKQTPxyGraph { +class LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPfilledVerticalRangeGraph(JKQtBasePlotter* parent=nullptr); + JKQTPFilledVerticalRangeGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPfilledVerticalRangeGraph(JKQtPlotter* parent); + JKQTPFilledVerticalRangeGraph(JKQTPLotter* parent); /** \brief get the maximum and minimum y-value of the graph * * The result is given in the two parameters which are call-by-reference parameters! */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int column) const override; /** \brief plots the graph to the plotter object specified as parent */ @@ -438,7 +438,7 @@ class LIB_EXPORT JKQTPfilledVerticalRangeGraph: public JKQTPxyGraph { /** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */ QColor selectionLineColor; - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ diff --git a/lib/jkqtplotter/jkqtpgraphsgeometric.cpp b/lib/jkqtplotter/jkqtpgraphsgeometric.cpp index a920b7dc62..b8b84acfb4 100644 --- a/lib/jkqtplotter/jkqtpgraphsgeometric.cpp +++ b/lib/jkqtplotter/jkqtpgraphsgeometric.cpp @@ -26,8 +26,8 @@ #define SmallestGreaterZeroCompare_xvsgz() if ((xvsgz>10.0*DBL_MIN)&&((smallestGreaterZero<10.0*DBL_MIN) || (xvsgzcolor=color; this->lineWidth=lineWidth; @@ -35,8 +35,8 @@ JKQTPgeoBaseLine::JKQTPgeoBaseLine(QColor color, double lineWidth, Qt::PenStyle title=""; } -JKQTPgeoBaseLine::JKQTPgeoBaseLine(QColor color, double lineWidth, Qt::PenStyle style, JKQtPlotter* parent): - JKQTPplotObject(parent) +JKQTPGeoBaseLine::JKQTPGeoBaseLine(QColor color, double lineWidth, Qt::PenStyle style, JKQTPLotter* parent): + JKQTPPlotObject(parent) { this->color=color; this->lineWidth=lineWidth; @@ -44,12 +44,12 @@ JKQTPgeoBaseLine::JKQTPgeoBaseLine(QColor color, double lineWidth, Qt::PenStyle title=""; } -void JKQTPgeoBaseLine::setAlpha(float alpha) +void JKQTPGeoBaseLine::setAlpha(float alpha) { color.setAlphaF(alpha); } -QPen JKQTPgeoBaseLine::getPen(JKQTPEnhancedPainter& painter) { +QPen JKQTPGeoBaseLine::getPen(JKQTPEnhancedPainter& painter) { QPen p; p.setColor(color); p.setStyle(style); @@ -57,7 +57,7 @@ QPen JKQTPgeoBaseLine::getPen(JKQTPEnhancedPainter& painter) { return p; } -void JKQTPgeoBaseLine::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPGeoBaseLine::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); painter.setPen(getPen(painter)); double y=rect.top()+rect.height()/2.0; @@ -65,64 +65,64 @@ void JKQTPgeoBaseLine::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect painter.restore(); } -QColor JKQTPgeoBaseLine::getKeyLabelColor() { +QColor JKQTPGeoBaseLine::getKeyLabelColor() { return color; } -JKQTPgeoBaseFilled::JKQTPgeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, Qt::BrushStyle fillStyle, JKQtBasePlotter* parent): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoBaseFilled::JKQTPGeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, Qt::BrushStyle fillStyle, JKQTBasePlotter* parent): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->fillColor=fillColor; this->fillStyle=fillStyle; } -JKQTPgeoBaseFilled::JKQTPgeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, Qt::BrushStyle fillStyle, JKQtPlotter* parent): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoBaseFilled::JKQTPGeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, Qt::BrushStyle fillStyle, JKQTPLotter* parent): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->fillColor=fillColor; this->fillStyle=fillStyle; } -JKQTPgeoBaseFilled::JKQTPgeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, JKQtPlotter* parent): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoBaseFilled::JKQTPGeoBaseFilled(QColor color, QColor fillColor, double lineWidth, Qt::PenStyle style, JKQTPLotter* parent): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->fillColor=fillColor; this->fillStyle=Qt::SolidPattern; } -JKQTPgeoBaseFilled::JKQTPgeoBaseFilled(QColor color, QColor fillColor, double lineWidth, JKQtPlotter* parent): - JKQTPgeoBaseLine(color, lineWidth, Qt::SolidLine, parent) +JKQTPGeoBaseFilled::JKQTPGeoBaseFilled(QColor color, QColor fillColor, double lineWidth, JKQTPLotter* parent): + JKQTPGeoBaseLine(color, lineWidth, Qt::SolidLine, parent) { this->fillColor=fillColor; this->fillStyle=Qt::SolidPattern; } -JKQTPgeoBaseFilled::JKQTPgeoBaseFilled(QColor color, QColor fillColor, JKQtPlotter* parent): - JKQTPgeoBaseLine(color, 2.0, Qt::SolidLine, parent) +JKQTPGeoBaseFilled::JKQTPGeoBaseFilled(QColor color, QColor fillColor, JKQTPLotter* parent): + JKQTPGeoBaseLine(color, 2.0, Qt::SolidLine, parent) { this->fillColor=fillColor; this->fillStyle=Qt::SolidPattern; } -void JKQTPgeoBaseFilled::setAlpha(float alpha) +void JKQTPGeoBaseFilled::setAlpha(float alpha) { - JKQTPgeoBaseLine::setAlpha(alpha); + JKQTPGeoBaseLine::setAlpha(alpha); fillColor.setAlphaF(alpha); } -void JKQTPgeoBaseFilled::setAlpha(float alphaLine, float alphaFill) +void JKQTPGeoBaseFilled::setAlpha(float alphaLine, float alphaFill) { - JKQTPgeoBaseLine::setAlpha(alphaLine); + JKQTPGeoBaseLine::setAlpha(alphaLine); fillColor.setAlphaF(alphaFill); } -QBrush JKQTPgeoBaseFilled::getBrush(JKQTPEnhancedPainter &/*painter*/) { +QBrush JKQTPGeoBaseFilled::getBrush(JKQTPEnhancedPainter &/*painter*/) { QBrush b; b.setColor(fillColor); b.setStyle(fillStyle); return b; } -void JKQTPgeoBaseFilled::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPGeoBaseFilled::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); painter.setPen(getPen(painter)); painter.setBrush(getBrush(painter)); @@ -134,8 +134,8 @@ void JKQTPgeoBaseFilled::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& re -JKQTPgeoText::JKQTPgeoText(JKQtBasePlotter* parent, double x, double y, QString text, double fontSize, QColor color): - JKQTPplotObject(parent) +JKQTPGeoText::JKQTPGeoText(JKQTBasePlotter* parent, double x, double y, QString text, double fontSize, QColor color): + JKQTPPlotObject(parent) { this->x=x; this->y=y; @@ -144,8 +144,8 @@ JKQTPgeoText::JKQTPgeoText(JKQtBasePlotter* parent, double x, double y, QString this->color=color; } -JKQTPgeoText::JKQTPgeoText(JKQtPlotter* parent, double x, double y, QString text, double fontSize, QColor color): - JKQTPplotObject(parent) +JKQTPGeoText::JKQTPGeoText(JKQTPLotter* parent, double x, double y, QString text, double fontSize, QColor color): + JKQTPPlotObject(parent) { this->x=x; this->y=y; @@ -153,21 +153,21 @@ JKQTPgeoText::JKQTPgeoText(JKQtPlotter* parent, double x, double y, QString text this->fontSize=fontSize; this->color=color; } -bool JKQTPgeoText::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPGeoText::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=maxx=x; smallestGreaterZero=0; if (x>10.0*DBL_MIN) smallestGreaterZero=x; return true; } -bool JKQTPgeoText::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPGeoText::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=maxy=y; smallestGreaterZero=0; if (y>10.0*DBL_MIN) smallestGreaterZero=y; return true; } -void JKQTPgeoText::draw(JKQTPEnhancedPainter& painter) { +void JKQTPGeoText::draw(JKQTPEnhancedPainter& painter) { painter.save(); #ifdef USE_XITS_FONTS parent->get_mathText()->useXITS(); @@ -179,7 +179,7 @@ void JKQTPgeoText::draw(JKQTPEnhancedPainter& painter) { painter.restore(); } -void JKQTPgeoText::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPGeoText::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); painter.setPen(getPen(painter)); double y=rect.top()+rect.height()/2.0; @@ -187,11 +187,11 @@ void JKQTPgeoText::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.restore(); } -QColor JKQTPgeoText::getKeyLabelColor() { +QColor JKQTPGeoText::getKeyLabelColor() { return color; } -QPen JKQTPgeoText::getPen(JKQTPEnhancedPainter &/*painter*/) { +QPen JKQTPGeoText::getPen(JKQTPEnhancedPainter &/*painter*/) { QPen p; p.setColor(color); return p; @@ -202,8 +202,8 @@ QPen JKQTPgeoText::getPen(JKQTPEnhancedPainter &/*painter*/) { -JKQTPgeoLine::JKQTPgeoLine(JKQtBasePlotter* parent, double x1, double y1, double x2, double y2, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoLine::JKQTPGeoLine(JKQTBasePlotter* parent, double x1, double y1, double x2, double y2, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->x1=x1; this->y1=y1; @@ -211,15 +211,15 @@ JKQTPgeoLine::JKQTPgeoLine(JKQtBasePlotter* parent, double x1, double y1, double this->y2=y2; } -JKQTPgeoLine::JKQTPgeoLine(JKQtPlotter* parent, double x1, double y1, double x2, double y2, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoLine::JKQTPGeoLine(JKQTPLotter* parent, double x1, double y1, double x2, double y2, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->x1=x1; this->y1=y1; this->x2=x2; this->y2=y2; } -bool JKQTPgeoLine::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPGeoLine::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=qMin(x1, x2); maxx=qMax(x1, x2); smallestGreaterZero=0; @@ -229,7 +229,7 @@ bool JKQTPgeoLine::getXMinMax(double& minx, double& maxx, double& smallestGreate return true; } -bool JKQTPgeoLine::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPGeoLine::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=qMin(y1, y2); maxy=qMax(y1, y2); smallestGreaterZero=0; @@ -239,7 +239,7 @@ bool JKQTPgeoLine::getYMinMax(double& miny, double& maxy, double& smallestGreate return true; } -void JKQTPgeoLine::draw(JKQTPEnhancedPainter& painter) { +void JKQTPGeoLine::draw(JKQTPEnhancedPainter& painter) { painter.save(); painter.setPen(getPen(painter)); QLineF l(QPointF(transformX(x1), transformY(y1)), QPointF(transformX(x2), transformY(y2))); @@ -252,8 +252,8 @@ void JKQTPgeoLine::draw(JKQTPEnhancedPainter& painter) { -JKQTPgeoInfiniteLine::JKQTPgeoInfiniteLine(JKQtBasePlotter* parent, double x, double y, double dx, double dy, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoInfiniteLine::JKQTPGeoInfiniteLine(JKQTBasePlotter* parent, double x, double y, double dx, double dy, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->x=x; this->y=y; @@ -262,8 +262,8 @@ JKQTPgeoInfiniteLine::JKQTPgeoInfiniteLine(JKQtBasePlotter* parent, double x, do this->two_sided=false; } -JKQTPgeoInfiniteLine::JKQTPgeoInfiniteLine(JKQtPlotter* parent, double x, double y, double dx, double dy, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoInfiniteLine::JKQTPGeoInfiniteLine(JKQTPLotter* parent, double x, double y, double dx, double dy, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->x=x; this->y=y; @@ -272,7 +272,7 @@ JKQTPgeoInfiniteLine::JKQTPgeoInfiniteLine(JKQtPlotter* parent, double x, double this->two_sided=false; } -bool JKQTPgeoInfiniteLine::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPGeoInfiniteLine::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=x; maxx=x; smallestGreaterZero=0; @@ -280,7 +280,7 @@ bool JKQTPgeoInfiniteLine::getXMinMax(double& minx, double& maxx, double& smalle return true; } -bool JKQTPgeoInfiniteLine::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { +bool JKQTPGeoInfiniteLine::getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) { miny=y; maxy=y; smallestGreaterZero=0; @@ -288,7 +288,7 @@ bool JKQTPgeoInfiniteLine::getYMinMax(double& miny, double& maxy, double& smalle return true; } -void JKQTPgeoInfiniteLine::draw(JKQTPEnhancedPainter& painter) { +void JKQTPGeoInfiniteLine::draw(JKQTPEnhancedPainter& painter) { double xmin=parent->get_xAxis()->getMin(); double xmax=parent->get_xAxis()->getMax(); @@ -417,29 +417,29 @@ void JKQTPgeoInfiniteLine::draw(JKQTPEnhancedPainter& painter) { -JKQTPgeoPolyLines::JKQTPgeoPolyLines(JKQtBasePlotter* parent, const QVector& points, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoPolyLines::JKQTPGeoPolyLines(JKQTBasePlotter* parent, const QVector& points, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->points=points; } -JKQTPgeoPolyLines::JKQTPgeoPolyLines(JKQtPlotter* parent, const QVector& points, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoPolyLines::JKQTPGeoPolyLines(JKQTPLotter* parent, const QVector& points, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { this->points=points; } -JKQTPgeoPolyLines::JKQTPgeoPolyLines(JKQtBasePlotter *parent, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoPolyLines::JKQTPGeoPolyLines(JKQTBasePlotter *parent, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { } -JKQTPgeoPolyLines::JKQTPgeoPolyLines(JKQtPlotter *parent, QColor color, double lineWidth, Qt::PenStyle style): - JKQTPgeoBaseLine(color, lineWidth, style, parent) +JKQTPGeoPolyLines::JKQTPGeoPolyLines(JKQTPLotter *parent, QColor color, double lineWidth, Qt::PenStyle style): + JKQTPGeoBaseLine(color, lineWidth, style, parent) { } -bool JKQTPgeoPolyLines::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPGeoPolyLines::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { minx=0; maxx=0; smallestGreaterZero=0; @@ -459,7 +459,7 @@ bool JKQTPgeoPolyLines::getXMinMax(double& minx, double& maxx, double& smallestG //qDebug()<<"getXMinMax"<x=x; this->y=y; @@ -498,8 +498,8 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtBasePlotter* parent, double x, double y this->height=height; } -JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter* parent, double x, double y, double width, double height, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): - JKQTPgeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) +JKQTPGeoRectangle::JKQTPGeoRectangle(JKQTPLotter* parent, double x, double y, double width, double height, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): + JKQTPGeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) { this->x=x; this->y=y; @@ -508,8 +508,8 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter* parent, double x, double y, do this->height=height; } -JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtBasePlotter *parent, double x, double y, double width, double height, double angle, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): - JKQTPgeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) +JKQTPGeoRectangle::JKQTPGeoRectangle(JKQTBasePlotter *parent, double x, double y, double width, double height, double angle, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): + JKQTPGeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) { this->x=x; this->y=y; @@ -518,8 +518,8 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtBasePlotter *parent, double x, double y this->height=height; } -JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter *parent, double x, double y, double width, double height, double angle, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): - JKQTPgeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) +JKQTPGeoRectangle::JKQTPGeoRectangle(JKQTPLotter *parent, double x, double y, double width, double height, double angle, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): + JKQTPGeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) { this->x=x; this->y=y; @@ -528,8 +528,8 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter *parent, double x, double y, do this->height=height; } -JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtBasePlotter *parent, QPointF bottomleft, QPointF topright, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): - JKQTPgeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) +JKQTPGeoRectangle::JKQTPGeoRectangle(JKQTBasePlotter *parent, QPointF bottomleft, QPointF topright, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): + JKQTPGeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) { this->angle=0; this->width=fabs(topright.x()-bottomleft.x()); @@ -538,8 +538,8 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtBasePlotter *parent, QPointF bottomleft this->y=bottomleft.y()+this->height/2.0; } -JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter *parent, QPointF bottomleft, QPointF topright, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): - JKQTPgeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) +JKQTPGeoRectangle::JKQTPGeoRectangle(JKQTPLotter *parent, QPointF bottomleft, QPointF topright, QColor color, double lineWidth, Qt::PenStyle style, QColor fillColor, Qt::BrushStyle fillStyle): + JKQTPGeoBaseFilled(color, fillColor, lineWidth, style, fillStyle, parent) { this->angle=0; this->width=fabs(topright.x()-bottomleft.x()); @@ -548,15 +548,15 @@ JKQTPgeoRectangle::JKQTPgeoRectangle(JKQtPlotter *parent, QPointF bottomleft, QP this->y=bottomleft.y()+this->height/2.0; } -QMatrix JKQTPgeoRectangle::getMatrix() { +QMatrix JKQTPGeoRectangle::getMatrix() { QMatrix trans; trans.rotate(angle); return trans; } -bool JKQTPgeoRectangle::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { +bool JKQTPGeoRectangle::getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) { QRectF bound=getPolygon().boundingRect(); - //std::cout<<"JKQTPgeoRectangle::getXMinMax: b.left="<\copybrief color @@ -281,14 +281,14 @@ class LIB_EXPORT JKQTPgeoSymbol: public JKQTPplotObject { /*! \brief sets the property symbol to the specified \a __value. \details Description of the parameter symbol is:
\copybrief symbol
\see symbol for more information */ - inline virtual void set_symbol(const JKQTPgraphSymbols & __value) + inline virtual void set_symbol(const JKQTPGraphSymbols & __value) { this->symbol = __value; } /*! \brief returns the property symbol. \details Description of the parameter symbol is:
\copybrief symbol
\see symbol for more information */ - inline virtual JKQTPgraphSymbols get_symbol() const + inline virtual JKQTPGraphSymbols get_symbol() const { return this->symbol; } @@ -349,9 +349,9 @@ class LIB_EXPORT JKQTPgeoSymbol: public JKQTPplotObject { return this->y; } - /** \copydoc JKQTPgraph::getXMinMax() */ + /** \copydoc JKQTPGraph::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero); - /** \copydoc JKQTPgraph::getYMinMax() */ + /** \copydoc JKQTPGraph::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero); /** \brief plots the graph to the plotter object specified as parent */ @@ -375,16 +375,16 @@ class LIB_EXPORT JKQTPgeoSymbol: public JKQTPplotObject { /** \brief width of the symbol lines in pt */ double symbolWidth; /** \brief type of the symbol */ - JKQTPgraphSymbols symbol; + JKQTPGraphSymbols symbol; }; -/*! \brief This JKQTPplotObject is used to display text. It uses the JKQTmathText +/*! \brief This JKQTPPlotObject is used to display text. It uses the JKQTMathText class in order to display LaTeX formulas. \ingroup jkqtplotter_geoplots */ -class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { +class LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject { Q_OBJECT public: /*! \brief class contructor @@ -396,7 +396,7 @@ class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { \param color color of drawing \param fontSize base font size of text */ - JKQTPgeoText(JKQtBasePlotter* parent, double x, double y, QString text, double fontSize=10, QColor color=QColor("black")); + JKQTPGeoText(JKQTBasePlotter* parent, double x, double y, QString text, double fontSize=10, QColor color=QColor("black")); /*! \brief class contructor \param parent parent plotter widget @@ -406,7 +406,7 @@ class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { \param color color of drawing \param fontSize base font size of text */ - JKQTPgeoText(JKQtPlotter* parent, double x, double y, QString text, double fontSize=10, QColor color=QColor("black")); + JKQTPGeoText(JKQTPLotter* parent, double x, double y, QString text, double fontSize=10, QColor color=QColor("black")); /*! \brief sets the property color to the specified \a __value. \details Description of the parameter color is:
\copybrief color
@@ -479,9 +479,9 @@ class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { return this->y; } - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -506,13 +506,13 @@ class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { QPen getPen(JKQTPEnhancedPainter& painter); }; -/*! \brief This JKQTPplotObject is used to draw a line +/*! \brief This JKQTPPlotObject is used to draw a line \ingroup jkqtplotter_geoplots \image html plot_geoline.png */ -class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { +class LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -526,7 +526,7 @@ class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoLine(JKQtBasePlotter* parent, double x1, double y1, double x2, double y2, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoLine(JKQTBasePlotter* parent, double x1, double y1, double x2, double y2, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -538,12 +538,12 @@ class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoLine(JKQtPlotter* parent, double x1, double y1, double x2, double y2, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoLine(JKQTPLotter* parent, double x1, double y1, double x2, double y2, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -611,7 +611,7 @@ class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { -/*! \brief This JKQTPplotObject is used to draw an infinite line +/*! \brief This JKQTPPlotObject is used to draw an infinite line \ingroup jkqtplotter_geoplots an infinite line has a starting point and then goes on in a given direction @@ -620,7 +620,7 @@ class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { \image html plot_geoinfiniteline.png */ -class LIB_EXPORT JKQTPgeoInfiniteLine: public JKQTPgeoBaseLine { +class LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -634,7 +634,7 @@ class LIB_EXPORT JKQTPgeoInfiniteLine: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoInfiniteLine(JKQtBasePlotter* parent, double x, double y, double dx, double dy, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoInfiniteLine(JKQTBasePlotter* parent, double x, double y, double dx, double dy, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -646,12 +646,12 @@ class LIB_EXPORT JKQTPgeoInfiniteLine: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoInfiniteLine(JKQtPlotter* parent, double x, double y, double dx, double dy, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoInfiniteLine(JKQTPLotter* parent, double x, double y, double dx, double dy, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -735,13 +735,13 @@ class LIB_EXPORT JKQTPgeoInfiniteLine: public JKQTPgeoBaseLine { }; -/*! \brief This JKQTPplotObject is used to draw a poly line +/*! \brief This JKQTPPlotObject is used to draw a poly line \ingroup jkqtplotter_geoplots \image html plot_geolines.png */ -class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { +class LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -752,7 +752,7 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoPolyLines(JKQtBasePlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoPolyLines(JKQTBasePlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -761,7 +761,7 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoPolyLines(JKQtPlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoPolyLines(JKQTPLotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -770,7 +770,7 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoPolyLines(JKQtBasePlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoPolyLines(JKQTBasePlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -779,12 +779,12 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { \param lineWidth width of line \param style line style */ - JKQTPgeoPolyLines(JKQtPlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoPolyLines(JKQTPLotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -818,12 +818,12 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { QVector points; }; -/*! \brief This JKQTPplotObject is used to draw a rectangle +/*! \brief This JKQTPPlotObject is used to draw a rectangle \ingroup jkqtplotter_geoplots \image html plot_georectangle.png */ -class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { +class LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled { Q_OBJECT public: /*! \brief class constructor @@ -839,7 +839,7 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtBasePlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTBasePlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -853,7 +853,7 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtPlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTPLotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -868,7 +868,7 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtBasePlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTBasePlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -883,7 +883,7 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtPlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTPLotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -895,7 +895,7 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtBasePlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTBasePlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -907,13 +907,13 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoRectangle(JKQtPlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoRectangle(JKQTPLotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -1002,13 +1002,13 @@ protected: }; -/*! \brief This JKQTPplotObject is used to draw a polygon +/*! \brief This JKQTPPlotObject is used to draw a polygon \ingroup jkqtplotter_geoplots \image html plot_geopolygon.png */ -class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { +class LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled { Q_OBJECT public: /*! \brief class constructor @@ -1022,7 +1022,7 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { \param fillStyle style of the filling */ - JKQTPgeoPolygon(JKQtBasePlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPolygon(JKQTBasePlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1033,7 +1033,7 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { \param fillColor color of the filling \param fillStyle style of the filling */ - JKQTPgeoPolygon(JKQtPlotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPolygon(JKQTPLotter* parent, const QVector& points, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor @@ -1045,7 +1045,7 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { \param fillStyle style of the filling */ - JKQTPgeoPolygon(JKQtBasePlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPolygon(JKQTBasePlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1055,12 +1055,12 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { \param fillColor color of the filling \param fillStyle style of the filling */ - JKQTPgeoPolygon(JKQtPlotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPolygon(JKQTPLotter* parent, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ @@ -1095,7 +1095,7 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { QVector points; }; -/*! \brief This JKQTPplotObject is used to draw an ellipse +/*! \brief This JKQTPPlotObject is used to draw an ellipse \ingroup jkqtplotter_geoplots \image html plot_geoellipse.png @@ -1103,7 +1103,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 LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle { Q_OBJECT public: /*! \brief class constructor @@ -1119,7 +1119,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoEllipse(JKQtBasePlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTBasePlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor @@ -1134,7 +1134,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoEllipse(JKQtPlotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTPLotter* parent, double x, double y, double width, double height, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1149,7 +1149,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoEllipse(JKQtBasePlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTBasePlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1164,7 +1164,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoEllipse(JKQtPlotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTPLotter* parent, double x, double y, double width, double height, double angle, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1176,7 +1176,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoEllipse(JKQtBasePlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTBasePlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1188,7 +1188,7 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { \param fillColor filling color of rectangle \param fillStyle filling style of rectangle */ - JKQTPgeoEllipse(JKQtPlotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoEllipse(JKQTPLotter* parent, QPointF bottomleft, QPointF topright, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /** \brief plots the graph to the plotter object specified as parent */ @@ -1214,12 +1214,12 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { }; -/*! \brief This JKQTPplotObject is used to draw an arc +/*! \brief This JKQTPPlotObject is used to draw an arc \ingroup jkqtplotter_geoplots \image html plot_geoarc.png */ -class LIB_EXPORT JKQTPgeoArc: public JKQTPgeoBaseLine { +class LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -1234,7 +1234,7 @@ class LIB_EXPORT JKQTPgeoArc: public JKQTPgeoBaseLine { \param style line style */ - JKQTPgeoArc(JKQtBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoArc(JKQTBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); /*! \brief class constructor \param parent the parent plotter class @@ -1247,11 +1247,11 @@ class LIB_EXPORT JKQTPgeoArc: public JKQTPgeoBaseLine { \param style line style */ - JKQTPgeoArc(JKQtPlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); + JKQTPGeoArc(JKQTPLotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; @@ -1394,12 +1394,12 @@ class LIB_EXPORT JKQTPgeoArc: public JKQTPgeoBaseLine { -/*! \brief This JKQTPplotObject is used to draw a pie +/*! \brief This JKQTPPlotObject is used to draw a pie \ingroup jkqtplotter_geoplots \image html plot_geopie.png */ -class LIB_EXPORT JKQTPgeoPie: public JKQTPgeoEllipse { +class LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse { Q_OBJECT public: /*! \brief class constructor @@ -1415,7 +1415,7 @@ class LIB_EXPORT JKQTPgeoPie: public JKQTPgeoEllipse { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoPie(JKQtBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPie(JKQTBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1429,12 +1429,12 @@ class LIB_EXPORT JKQTPgeoPie: public JKQTPgeoEllipse { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoPie(JKQtPlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoPie(JKQTPLotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; @@ -1479,12 +1479,12 @@ class LIB_EXPORT JKQTPgeoPie: public JKQTPgeoEllipse { -/*! \brief This JKQTPplotObject is used to draw a chord +/*! \brief This JKQTPPlotObject is used to draw a chord \ingroup jkqtplotter_geoplots \image html plot_geochord.png */ -class LIB_EXPORT JKQTPgeoChord: public JKQTPgeoPie { +class LIB_EXPORT JKQTPGeoChord: public JKQTPGeoPie { Q_OBJECT public: /*! \brief class constructor @@ -1500,7 +1500,7 @@ class LIB_EXPORT JKQTPgeoChord: public JKQTPgeoPie { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoChord(JKQtBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoChord(JKQTBasePlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); /*! \brief class constructor \param parent the parent plotter class @@ -1514,11 +1514,11 @@ class LIB_EXPORT JKQTPgeoChord: public JKQTPgeoPie { \param fillColor filling color of ellipse \param fillStyle filling style of ellipse */ - JKQTPgeoChord(JKQtPlotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); + JKQTPGeoChord(JKQTPLotter* parent, double x, double y, double width, double height, double angleStart, double angleStop, QColor color=QColor("black"), double lineWidth=1, Qt::PenStyle style=Qt::SolidLine, QColor fillColor=QColor("transparent"), Qt::BrushStyle fillStyle=Qt::SolidPattern); - /** \copydoc JKQTPplotObject::getXMinMax() */ + /** \copydoc JKQTPPlotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPplotObject::getYMinMax() */ + /** \copydoc JKQTPPlotObject::getYMinMax() */ virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; /** \brief plots the graph to the plotter object specified as parent */ diff --git a/lib/jkqtplotter/jkqtpgraphsimage.cpp b/lib/jkqtplotter/jkqtpgraphsimage.cpp index 8d82b44d79..ce5bc4537f 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimage.cpp @@ -32,8 +32,8 @@ #include -JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, JKQtBasePlotter* parent): - JKQTPgraph(parent) +JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent): + JKQTPGraph(parent) { title=""; this->width=width; @@ -42,8 +42,8 @@ JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, this->y=y; } -JKQTPImageBase::JKQTPImageBase(JKQtBasePlotter *parent): - JKQTPgraph(parent) +JKQTPImageBase::JKQTPImageBase(JKQTBasePlotter *parent): + JKQTPGraph(parent) { title=""; this->width=0; @@ -52,8 +52,8 @@ JKQTPImageBase::JKQTPImageBase(JKQtBasePlotter *parent): this->y=0; } -JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, JKQtPlotter* parent): - JKQTPgraph(parent) +JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, JKQTPLotter* parent): + JKQTPGraph(parent) { title=""; this->width=width; @@ -62,8 +62,8 @@ JKQTPImageBase::JKQTPImageBase(double x, double y, double width, double height, this->y=y; } -JKQTPImageBase::JKQTPImageBase(JKQtPlotter *parent): - JKQTPgraph(parent) +JKQTPImageBase::JKQTPImageBase(JKQTPLotter *parent): + JKQTPGraph(parent) { title=""; this->width=0; @@ -152,42 +152,42 @@ void JKQTPImageBase::plotImage(JKQTPEnhancedPainter& painter, QImage& image, dou -JKQTPImage::JKQTPImage(JKQtBasePlotter *parent): +JKQTPImage::JKQTPImage(JKQTBasePlotter *parent): JKQTPImageBase(parent), image_owned(false) { this->image=nullptr; createImageActions(); } -JKQTPImage::JKQTPImage(double x, double y, double width, double height, QImage* image, JKQtBasePlotter* parent): +JKQTPImage::JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTBasePlotter* parent): JKQTPImageBase(x, y, width, height, parent), image_owned(false) { this->image=image; createImageActions(); } -JKQTPImage::JKQTPImage(JKQtPlotter *parent): +JKQTPImage::JKQTPImage(JKQTPLotter *parent): JKQTPImageBase(parent), image_owned(false) { this->image=nullptr; createImageActions(); } -JKQTPImage::JKQTPImage(double x, double y, double width, double height, QImage* image, JKQtPlotter* parent): +JKQTPImage::JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTPLotter* parent): JKQTPImageBase(x, y, width, height, parent), image_owned(false) { this->image=image; createImageActions(); } -JKQTPImage::JKQTPImage(double x, double y, double width, double height, const QImage &image, JKQtBasePlotter *parent): +JKQTPImage::JKQTPImage(double x, double y, double width, double height, const QImage &image, JKQTBasePlotter *parent): JKQTPImageBase(x, y, width, height, parent), image_owned(true) { this->image=new QImage(image); createImageActions(); } -JKQTPImage::JKQTPImage(double x, double y, double width, double height, const QImage &image, JKQtPlotter *parent): +JKQTPImage::JKQTPImage(double x, double y, double width, double height, const QImage &image, JKQTPLotter *parent): JKQTPImageBase(x, y, width, height, parent), image_owned(true) { this->image=new QImage(image); @@ -206,7 +206,7 @@ void JKQTPImage::draw(JKQTPEnhancedPainter& painter) { void JKQTPImage::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) { - painter.drawImage(rect, QPixmap(":/JKQTPlotter/jkqtp_plot_image.png").toImage()); + painter.drawImage(rect, QPixmap(":/JKQTPLotter/jkqtp_plot_image.png").toImage()); } void JKQTPImage::set_image(const QImage &image) @@ -243,7 +243,7 @@ void JKQTPImage::createImageActions() } -void JKQTPImage::setParent(JKQtBasePlotter *parent) +void JKQTPImage::setParent(JKQTBasePlotter *parent) { if (this->parent) { this->parent->deregisterAdditionalAction(actSaveImage); @@ -322,7 +322,7 @@ void JKQTPImage::copyImagePlotAsImage() -JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent): +JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent): JKQTPImageBase(x, y, width, height, parent) { this->data=data; @@ -335,7 +335,7 @@ JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double } -JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent): +JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent): JKQTPImageBase(x, y, width, height, parent) { this->data=data; @@ -351,7 +351,7 @@ void JKQTPMathImageBase::drawKeyMarker(JKQTPEnhancedPainter &/*painter*/, QRectF } -JKQTPMathImageBase::JKQTPMathImageBase(JKQtBasePlotter *parent): +JKQTPMathImageBase::JKQTPMathImageBase(JKQTBasePlotter *parent): JKQTPImageBase(parent) { this->data=nullptr; @@ -363,7 +363,7 @@ JKQTPMathImageBase::JKQTPMathImageBase(JKQtBasePlotter *parent): modifierMode=ModifyNone; } -JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQtBasePlotter *parent): +JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter *parent): JKQTPImageBase(x,y,width,height,parent) { this->data=nullptr; @@ -375,7 +375,7 @@ JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double modifierMode=ModifyNone; } -JKQTPMathImageBase::JKQTPMathImageBase(JKQtPlotter *parent): +JKQTPMathImageBase::JKQTPMathImageBase(JKQTPLotter *parent): JKQTPImageBase(parent) { this->data=nullptr; @@ -387,7 +387,7 @@ JKQTPMathImageBase::JKQTPMathImageBase(JKQtPlotter *parent): modifierMode=ModifyNone; } -JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQtPlotter *parent): +JKQTPMathImageBase::JKQTPMathImageBase(double x, double y, double width, double height, JKQTPLotter *parent): JKQTPImageBase(x,y,width,height,parent) { this->data=nullptr; @@ -425,44 +425,44 @@ void JKQTPMathImageBase::getDataMinMax(double& imin, double& imax) { if (!data) return; switch(datatype) { case JKQTPMathImageBase::DoubleArray: - imin= JKQTPimagePlot_getImageMin((double*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((double*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((double*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((double*)data, Nx, Ny); break; case JKQTPMathImageBase::FloatArray: - imin= JKQTPimagePlot_getImageMin((float*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((float*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((float*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((float*)data, Nx, Ny); break; case JKQTPMathImageBase::UInt8Array: - imin= JKQTPimagePlot_getImageMin((uint8_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint8_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint8_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint8_t*)data, Nx, Ny); break; case JKQTPMathImageBase::UInt16Array: - imin= JKQTPimagePlot_getImageMin((uint16_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint16_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint16_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint16_t*)data, Nx, Ny); break; case JKQTPMathImageBase::UInt32Array: - imin= JKQTPimagePlot_getImageMin((uint32_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint32_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint32_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint32_t*)data, Nx, Ny); break; case JKQTPMathImageBase::UInt64Array: - imin= JKQTPimagePlot_getImageMin((uint64_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint64_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint64_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint64_t*)data, Nx, Ny); break; case JKQTPMathImageBase::Int8Array: - imin= JKQTPimagePlot_getImageMin((int8_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int8_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int8_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int8_t*)data, Nx, Ny); break; case JKQTPMathImageBase::Int16Array: - imin= JKQTPimagePlot_getImageMin((int16_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int16_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int16_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int16_t*)data, Nx, Ny); break; case JKQTPMathImageBase::Int32Array: - imin= JKQTPimagePlot_getImageMin((int32_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int32_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int32_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int32_t*)data, Nx, Ny); break; case JKQTPMathImageBase::Int64Array: - imin= JKQTPimagePlot_getImageMin((int64_t*)data, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int64_t*)data, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int64_t*)data, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int64_t*)data, Nx, Ny); break; } } @@ -474,44 +474,44 @@ void JKQTPMathImageBase::getModifierMinMax(double &imin, double &imax) if (!dataModifier) return; switch(datatypeModifier) { case JKQTPMathImageBase::DoubleArray: - imin= JKQTPimagePlot_getImageMin((double*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((double*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((double*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((double*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::FloatArray: - imin= JKQTPimagePlot_getImageMin((float*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((float*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((float*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((float*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::UInt8Array: - imin= JKQTPimagePlot_getImageMin((uint8_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint8_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint8_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint8_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::UInt16Array: - imin= JKQTPimagePlot_getImageMin((uint16_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint16_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint16_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint16_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::UInt32Array: - imin= JKQTPimagePlot_getImageMin((uint32_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint32_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint32_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint32_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::UInt64Array: - imin= JKQTPimagePlot_getImageMin((uint64_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint64_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint64_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint64_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::Int8Array: - imin= JKQTPimagePlot_getImageMin((int8_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int8_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int8_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int8_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::Int16Array: - imin= JKQTPimagePlot_getImageMin((int16_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int16_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int16_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int16_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::Int32Array: - imin= JKQTPimagePlot_getImageMin((int32_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int32_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int32_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int32_t*)dataModifier, Nx, Ny); break; case JKQTPMathImageBase::Int64Array: - imin= JKQTPimagePlot_getImageMin((int64_t*)dataModifier, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int64_t*)dataModifier, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int64_t*)dataModifier, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int64_t*)dataModifier, Nx, Ny); break; } } @@ -520,34 +520,34 @@ QVector JKQTPMathImageBase::getDataAsDoubleVector() const { switch(datatype) { case JKQTPMathImageBase::DoubleArray: - return JKQTPimagePlot_arrayToDVector((double*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((double*)data, Nx*Ny); break; case JKQTPMathImageBase::FloatArray: - return JKQTPimagePlot_arrayToDVector((float*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((float*)data, Nx*Ny); break; case JKQTPMathImageBase::UInt8Array: - return JKQTPimagePlot_arrayToDVector((uint8_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint8_t*)data, Nx*Ny); break; case JKQTPMathImageBase::UInt16Array: - return JKQTPimagePlot_arrayToDVector((uint16_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint16_t*)data, Nx*Ny); break; case JKQTPMathImageBase::UInt32Array: - return JKQTPimagePlot_arrayToDVector((uint32_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint32_t*)data, Nx*Ny); break; case JKQTPMathImageBase::UInt64Array: - return JKQTPimagePlot_arrayToDVector((uint64_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint64_t*)data, Nx*Ny); break; case JKQTPMathImageBase::Int8Array: - return JKQTPimagePlot_arrayToDVector((int8_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int8_t*)data, Nx*Ny); break; case JKQTPMathImageBase::Int16Array: - return JKQTPimagePlot_arrayToDVector((int16_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int16_t*)data, Nx*Ny); break; case JKQTPMathImageBase::Int32Array: - return JKQTPimagePlot_arrayToDVector((int32_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int32_t*)data, Nx*Ny); break; case JKQTPMathImageBase::Int64Array: - return JKQTPimagePlot_arrayToDVector((int64_t*)data, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int64_t*)data, Nx*Ny); break; } QVector res; @@ -558,34 +558,34 @@ QVector JKQTPMathImageBase::getDataModifierAsDoubleVector() const { switch(datatypeModifier) { case JKQTPMathImageBase::DoubleArray: - return JKQTPimagePlot_arrayToDVector((double*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((double*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::FloatArray: - return JKQTPimagePlot_arrayToDVector((float*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((float*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::UInt8Array: - return JKQTPimagePlot_arrayToDVector((uint8_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint8_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::UInt16Array: - return JKQTPimagePlot_arrayToDVector((uint16_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint16_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::UInt32Array: - return JKQTPimagePlot_arrayToDVector((uint32_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint32_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::UInt64Array: - return JKQTPimagePlot_arrayToDVector((uint64_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint64_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::Int8Array: - return JKQTPimagePlot_arrayToDVector((int8_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int8_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::Int16Array: - return JKQTPimagePlot_arrayToDVector((int16_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int16_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::Int32Array: - return JKQTPimagePlot_arrayToDVector((int32_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int32_t*)dataModifier, Nx*Ny); break; case JKQTPMathImageBase::Int64Array: - return JKQTPimagePlot_arrayToDVector((int64_t*)dataModifier, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int64_t*)dataModifier, Nx*Ny); break; } QVector res; @@ -621,16 +621,16 @@ void JKQTPMathImageBase::modifyImage(QImage &img, void *dataModifier, JKQTPMathI } //qDebug()<<"mod: "<((double*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::FloatArray: JKQTPimagePlot_array2RGBimage((float*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::UInt8Array: JKQTPimagePlot_array2RGBimage((uint8_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::UInt16Array: JKQTPimagePlot_array2RGBimage((uint16_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::UInt32Array: JKQTPimagePlot_array2RGBimage((uint32_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::UInt64Array: JKQTPimagePlot_array2RGBimage((uint64_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::Int8Array: JKQTPimagePlot_array2RGBimage((int8_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::Int16Array: JKQTPimagePlot_array2RGBimage((int16_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::Int32Array: JKQTPimagePlot_array2RGBimage((int32_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; - case JKQTPMathImageBase::Int64Array: JKQTPimagePlot_array2RGBimage((int64_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::DoubleArray: JKQTPImagePlot_array2RGBimage((double*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::FloatArray: JKQTPImagePlot_array2RGBimage((float*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::UInt8Array: JKQTPImagePlot_array2RGBimage((uint8_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::UInt16Array: JKQTPImagePlot_array2RGBimage((uint16_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::UInt32Array: JKQTPImagePlot_array2RGBimage((uint32_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::UInt64Array: JKQTPImagePlot_array2RGBimage((uint64_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::Int8Array: JKQTPImagePlot_array2RGBimage((int8_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::Int16Array: JKQTPImagePlot_array2RGBimage((int16_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::Int32Array: JKQTPImagePlot_array2RGBimage((int32_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; + case JKQTPMathImageBase::Int64Array: JKQTPImagePlot_array2RGBimage((int64_t*)dataModifier, Nx, Ny, img, modChannel, internalModifierMin, internalModifierMax, rgbModMode); break; } } } @@ -649,7 +649,7 @@ void JKQTPMathImage::initJKQTPMathImage() { actCopyPalette=new QAction(tr("Copy JKQTPMathImage Palette/Colorbar ..."), this); connect(actCopyPalette, SIGNAL(triggered()), this, SLOT(copyColorbarPlotAsImage())); - colorBarRightAxis=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); @@ -659,7 +659,7 @@ void JKQTPMathImage::initJKQTPMathImage() { colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); colorBarRightAxis->set_showZeroAxis(false); - colorBarTopAxis=new JKQTPhorizontalIndependentAxis(0, 100, 0, 100, parent); + colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); @@ -670,7 +670,7 @@ void JKQTPMathImage::initJKQTPMathImage() { colorBarTopAxis->set_minorTickOutsideLength(0); colorBarTopAxis->set_showZeroAxis(false); - modifierColorBarTopAxis=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + modifierColorBarTopAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) modifierColorBarTopAxis->loadSettings(parent->get_xAxis()); modifierColorBarTopAxis->set_drawMode1(JKQTPCADMline); modifierColorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); @@ -680,7 +680,7 @@ void JKQTPMathImage::initJKQTPMathImage() { modifierColorBarTopAxis->set_minorTicks(0); modifierColorBarTopAxis->set_tickOutsideLength(0); modifierColorBarTopAxis->set_minorTickOutsideLength(0); - modifierColorBarRightAxis=new JKQTPhorizontalIndependentAxis (0, 100, 0, 100, parent); + modifierColorBarRightAxis=new JKQTPHorizontalIndependentAxis (0, 100, 0, 100, parent); if (parent) modifierColorBarRightAxis->loadSettings(parent->get_yAxis()); modifierColorBarRightAxis->set_drawMode1(JKQTPCADMline); modifierColorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); @@ -716,14 +716,14 @@ void JKQTPMathImage::initJKQTPMathImage() { this->autoModifierRange=true; } -JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtBasePlotter* parent): +JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTBasePlotter* parent): JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) { initJKQTPMathImage(); this->palette=palette; } -JKQTPMathImage::JKQTPMathImage(JKQtBasePlotter *parent): +JKQTPMathImage::JKQTPMathImage(JKQTBasePlotter *parent): JKQTPMathImageBase(0, 0, 1, 1, JKQTPMathImageBase::UInt8Array, nullptr, 0, 0, parent) { initJKQTPMathImage(); @@ -731,20 +731,20 @@ JKQTPMathImage::JKQTPMathImage(JKQtBasePlotter *parent): -JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtPlotter* parent): +JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTPLotter* parent): JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) { initJKQTPMathImage(); this->palette=palette; } -JKQTPMathImage::JKQTPMathImage(JKQtPlotter *parent): +JKQTPMathImage::JKQTPMathImage(JKQTPLotter *parent): JKQTPMathImageBase(0, 0, 1, 1, JKQTPMathImageBase::UInt8Array, nullptr, 0, 0, parent) { initJKQTPMathImage(); } -void JKQTPMathImage::setParent(JKQtBasePlotter* parent) { +void JKQTPMathImage::setParent(JKQTBasePlotter* parent) { if (this->parent) { this->parent->deregisterAdditionalAction(actSaveImage); this->parent->deregisterAdditionalAction(actCopyImage); @@ -887,7 +887,7 @@ void JKQTPMathImage::draw(JKQTPEnhancedPainter& painter) { void JKQTPMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpace, int& rightSpace, int& topSpace, int& bottomSpace) { - JKQTPgraph::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); + JKQTPGraph::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); if (showColorBar) { getDataMinMax(internalDataMin, internalDataMax); getModifierMinMax(internalModifierMin, internalModifierMax); @@ -1065,7 +1065,7 @@ QImage JKQTPMathImage::drawOutsidePalette(int steps) } QImage b(h,200, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(d,h,steps, b, palette, 0, steps-1); + JKQTPImagePlot_array2image(d,h,steps, b, palette, 0, steps-1); if (modifierMode!=ModifyNone) { modifyImage(b, dd, UInt8Array, h,steps, 0, h-1); } @@ -1122,7 +1122,7 @@ void JKQTPMathImage::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) } QStringList JKQTPMathImage::getPalettes() { - return JKQTPimagePlot_getPredefinedPalettes(); + return JKQTPImagePlot_getPredefinedPalettes(); } int JKQTPMathImage::getPalettesCount() @@ -1131,9 +1131,9 @@ int JKQTPMathImage::getPalettesCount() } QIcon JKQTPMathImage::getPaletteIcon(int i) { - QImage img=getPaletteImage(i, JKQTP_PALETTE_ICON_WIDTH); - QPixmap pix(JKQTP_PALETTE_ICON_WIDTH,8); - QRect r(0,0,JKQTP_PALETTE_ICON_WIDTH-1,7); + QImage img=getPaletteImage(i, jkqtp_PALETTE_ICON_WIDTH); + QPixmap pix(jkqtp_PALETTE_ICON_WIDTH,8); + QRect r(0,0,jkqtp_PALETTE_ICON_WIDTH-1,7); JKQTPEnhancedPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -1154,7 +1154,7 @@ QImage JKQTPMathImage::getPaletteImage(int i, int width, int height) for (int j=0; j(pic, width, qMax(1,height), img, (JKQTPMathImageColorPalette)i, 0, width-1); + JKQTPImagePlot_array2image(pic, width, qMax(1,height), img, (JKQTPMathImageColorPalette)i, 0, width-1); free(pic); return img; } @@ -1166,9 +1166,9 @@ QImage JKQTPMathImage::getPaletteImage(JKQTPMathImageColorPalette palette, int w QIcon JKQTPMathImage::getPaletteKeyIcon(int i) { - QImage img=getPaletteKeyImage(i, JKQTP_PALETTE_ICON_WIDTH, JKQTP_PALETTE_IMAGEICON_HEIGHT); - QPixmap pix(JKQTP_PALETTE_ICON_WIDTH,JKQTP_PALETTE_IMAGEICON_HEIGHT); - QRect r(0,0,JKQTP_PALETTE_ICON_WIDTH-1,JKQTP_PALETTE_IMAGEICON_HEIGHT-1); + QImage img=getPaletteKeyImage(i, jkqtp_PALETTE_ICON_WIDTH, jkqtp_PALETTE_IMAGEICON_HEIGHT); + QPixmap pix(jkqtp_PALETTE_ICON_WIDTH,jkqtp_PALETTE_IMAGEICON_HEIGHT); + QRect r(0,0,jkqtp_PALETTE_ICON_WIDTH-1,jkqtp_PALETTE_IMAGEICON_HEIGHT-1); JKQTPEnhancedPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -1203,7 +1203,7 @@ QImage JKQTPMathImage::getPaletteKeyImage(int i, int width, int height) pic[j]=exp(-0.5*(double((x-x01)*double(x-x01))/w1x+double((y-y01)*double(y-y01))/w1y))+0.7*exp(-0.5*(double((x-x02)*double(x-x02))/w2x+double((y-y02)*double(y-y02))/w2y)); if (pic[j]>mmax) mmax=pic[j]; } - JKQTPimagePlot_array2image(pic, width, height, img, (JKQTPMathImageColorPalette)i, 0, mmax); + JKQTPImagePlot_array2image(pic, width, height, img, (JKQTPMathImageColorPalette)i, 0, mmax); free(pic); return img; } @@ -1220,16 +1220,16 @@ QImage JKQTPMathImage::drawImage() { QImage img(Nx, Ny, QImage::Format_ARGB32); getDataMinMax(internalDataMin, internalDataMax); switch(datatype) { - case JKQTPMathImageBase::DoubleArray: JKQTPimagePlot_array2image((double*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::FloatArray: JKQTPimagePlot_array2image((float*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::UInt8Array: JKQTPimagePlot_array2image((uint8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::UInt16Array: JKQTPimagePlot_array2image((uint16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::UInt32Array: JKQTPimagePlot_array2image((uint32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::UInt64Array: JKQTPimagePlot_array2image((uint64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::Int8Array: JKQTPimagePlot_array2image((int8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::Int16Array: JKQTPimagePlot_array2image((int16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::Int32Array: JKQTPimagePlot_array2image((int32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; - case JKQTPMathImageBase::Int64Array: JKQTPimagePlot_array2image((int64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::DoubleArray: JKQTPImagePlot_array2image((double*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::FloatArray: JKQTPImagePlot_array2image((float*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::UInt8Array: JKQTPImagePlot_array2image((uint8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::UInt16Array: JKQTPImagePlot_array2image((uint16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::UInt32Array: JKQTPImagePlot_array2image((uint32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::UInt64Array: JKQTPImagePlot_array2image((uint64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::Int8Array: JKQTPImagePlot_array2image((int8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::Int16Array: JKQTPImagePlot_array2image((int16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::Int32Array: JKQTPImagePlot_array2image((int32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; + case JKQTPMathImageBase::Int64Array: JKQTPImagePlot_array2image((int64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rangeMinFailAction, rangeMaxFailAction, rangeMinFailColor, rangeMaxFailColor, nanColor, infColor); break; } modifyImage(img); return img; @@ -1261,7 +1261,7 @@ void JKQTPMathImage::set_palette(int pal) { -JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtBasePlotter* parent): +JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTBasePlotter* parent): JKQTPImageBase(x, y, width, height, parent) { actSaveImage=new QAction(tr("Save JKQTPOverlayImage ..."), this); @@ -1275,7 +1275,7 @@ JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double he this->falseColor=QColor(Qt::transparent); } -JKQTPOverlayImage::JKQTPOverlayImage(JKQtBasePlotter *parent): +JKQTPOverlayImage::JKQTPOverlayImage(JKQTBasePlotter *parent): JKQTPImageBase(0,0,1,1, parent) { actSaveImage=new QAction(tr("Save JKQTPOverlayImage ..."), this); @@ -1288,7 +1288,7 @@ JKQTPOverlayImage::JKQTPOverlayImage(JKQtBasePlotter *parent): this->trueColor=QColor("red"); } -JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtPlotter* parent): +JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTPLotter* parent): JKQTPImageBase(x, y, width, height, parent) { actSaveImage=new QAction(tr("Save JKQTPOverlayImage ..."), this); @@ -1302,7 +1302,7 @@ JKQTPOverlayImage::JKQTPOverlayImage(double x, double y, double width, double he this->falseColor=QColor(Qt::transparent); } -JKQTPOverlayImage::JKQTPOverlayImage(JKQtPlotter *parent): +JKQTPOverlayImage::JKQTPOverlayImage(JKQTPLotter *parent): JKQTPImageBase(0,0,1,1, parent) { actSaveImage=new QAction(tr("Save JKQTPOverlayImage ..."), this); @@ -1372,40 +1372,40 @@ void JKQTPOverlayImage::set_data(bool* data, uint32_t Nx, uint32_t Ny) { } -JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtBasePlotter* parent): +JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTBasePlotter* parent): JKQTPOverlayImage(x, y, width, height, data, Nx, Ny, colTrue, parent) { - symbol=JKQTPtarget; + symbol=JKQTPTarget; symbolWidth=1; drawAsRectangles=true; symbolSizeFactor=0.9; rectanglesAsImageOverlay=false; } -JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQtBasePlotter *parent): +JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQTBasePlotter *parent): JKQTPOverlayImage(0,0,1,1,nullptr,0,0, QColor("red"), parent) { - symbol=JKQTPtarget; + symbol=JKQTPTarget; symbolWidth=1; drawAsRectangles=true; symbolSizeFactor=0.9; rectanglesAsImageOverlay=false; } -JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtPlotter* parent): +JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTPLotter* parent): JKQTPOverlayImage(x, y, width, height, data, Nx, Ny, colTrue, parent) { - symbol=JKQTPtarget; + symbol=JKQTPTarget; symbolWidth=1; drawAsRectangles=true; symbolSizeFactor=0.9; rectanglesAsImageOverlay=false; } -JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQtPlotter *parent): +JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQTPLotter *parent): JKQTPOverlayImage(0,0,1,1,nullptr,0,0, QColor("red"), parent) { - symbol=JKQTPtarget; + symbol=JKQTPTarget; symbolWidth=1; drawAsRectangles=true; symbolSizeFactor=0.9; @@ -1413,7 +1413,7 @@ JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQtPlotter *parent): } void JKQTPOverlayImageEnhanced::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { if (drawAsRectangles) JKQTPOverlayImage::drawKeyMarker(painter, rect); - else JKQTPplotSymbol(painter, rect.center().x(), rect.center().y(), symbol, qMin(rect.width(), rect.height()), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); + else JKQTPPlotSymbol(painter, rect.center().x(), rect.center().y(), symbol, qMin(rect.width(), rect.height()), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); } void JKQTPOverlayImageEnhanced::draw(JKQTPEnhancedPainter& painter) { @@ -1448,7 +1448,7 @@ void JKQTPOverlayImageEnhanced::draw(JKQTPEnhancedPainter& painter) { } else { QPointF p=(p1+p2)/2.0; if (data[ix+iy*Nx]) { - JKQTPplotSymbol(painter, p.x(), p.y(), symbol, fabs(p2.x()-p1.x())*symbolSizeFactor, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); + JKQTPPlotSymbol(painter, p.x(), p.y(), symbol, fabs(p2.x()-p1.x())*symbolSizeFactor, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); } } } @@ -1482,7 +1482,7 @@ void JKQTPRGBMathImage::initObject() connect(actCopyImage, SIGNAL(triggered()), this, SLOT(copyImagePlotAsImage())); rgbMode=JKQTPRGBMathImageModeRGBMode; - colorBarRightAxis=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); @@ -1492,7 +1492,7 @@ void JKQTPRGBMathImage::initObject() colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); colorBarRightAxis->set_showZeroAxis(false); - colorBarTopAxis=new JKQTPhorizontalIndependentAxis(0, 100, 0, 100, parent); + colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); @@ -1503,7 +1503,7 @@ void JKQTPRGBMathImage::initObject() colorBarTopAxis->set_minorTickOutsideLength(0); colorBarTopAxis->set_showZeroAxis(false); - colorBarRightAxisG=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + colorBarRightAxisG=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarRightAxisG->loadSettings(parent->get_yAxis()); colorBarRightAxisG->set_drawMode1(JKQTPCADMline); colorBarRightAxisG->set_drawMode2(JKQTPCADMcomplete); @@ -1513,7 +1513,7 @@ void JKQTPRGBMathImage::initObject() colorBarRightAxisG->set_minorTicks(0); colorBarRightAxisG->set_tickOutsideLength(0); colorBarRightAxisG->set_minorTickOutsideLength(0); - colorBarTopAxisG=new JKQTPhorizontalIndependentAxis(0, 100, 0, 100, parent); + colorBarTopAxisG=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarTopAxisG->loadSettings(parent->get_xAxis()); colorBarTopAxisG->set_drawMode1(JKQTPCADMline); colorBarTopAxisG->set_drawMode2(JKQTPCADMcomplete); @@ -1524,7 +1524,7 @@ void JKQTPRGBMathImage::initObject() colorBarTopAxisG->set_tickOutsideLength(0); colorBarTopAxisG->set_minorTickOutsideLength(0); - colorBarRightAxisB=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + colorBarRightAxisB=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarRightAxisB->loadSettings(parent->get_yAxis()); colorBarRightAxisB->set_drawMode1(JKQTPCADMline); colorBarRightAxisB->set_drawMode2(JKQTPCADMcomplete); @@ -1534,7 +1534,7 @@ void JKQTPRGBMathImage::initObject() colorBarRightAxisB->set_minorTicks(0); colorBarRightAxisB->set_tickOutsideLength(0); colorBarRightAxisB->set_minorTickOutsideLength(0); - colorBarTopAxisB=new JKQTPhorizontalIndependentAxis(0, 100, 0, 100, parent); + colorBarTopAxisB=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarTopAxisB->loadSettings(parent->get_xAxis()); colorBarTopAxisB->set_drawMode1(JKQTPCADMline); colorBarTopAxisB->set_drawMode2(JKQTPCADMcomplete); @@ -1569,33 +1569,33 @@ void JKQTPRGBMathImage::initObject() -JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) { initObject(); } -JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) { initObject(); } -JKQTPRGBMathImage::JKQTPRGBMathImage(JKQtBasePlotter *parent): +JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTBasePlotter *parent): JKQTPMathImageBase(0,0,0,0, DoubleArray, nullptr, 0, 0, parent) { initObject(); } -JKQTPRGBMathImage::JKQTPRGBMathImage(JKQtPlotter *parent): +JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTPLotter *parent): JKQTPMathImageBase(0,0,0,0, DoubleArray, nullptr, 0, 0, parent) { initObject(); } -void JKQTPRGBMathImage::setParent(JKQtBasePlotter* parent) { +void JKQTPRGBMathImage::setParent(JKQTBasePlotter* parent) { if (this->parent) { this->parent->deregisterAdditionalAction(actSaveImage); this->parent->deregisterAdditionalAction(actCopyImage); @@ -1626,7 +1626,7 @@ void JKQTPRGBMathImage::draw(JKQTPEnhancedPainter& painter) { void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpace, int& rightSpace, int& topSpace, int& bottomSpace) { ensureImageData(); - JKQTPgraph::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); + JKQTPGraph::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); if (showColorBar) { int visibleColorBars=0; if (data) visibleColorBars++; @@ -1741,8 +1741,8 @@ struct RGBOutsizeData { double internalDataMin; double internalDataMax; void* data; - JKQTPverticalIndependentAxis* colorBarRightAxis; - JKQTPhorizontalIndependentAxis* colorBarTopAxis; + JKQTPVerticalIndependentAxis* colorBarRightAxis; + JKQTPHorizontalIndependentAxis* colorBarTopAxis; QString name; JKQTPMathImageColorPalette palette; QImage paletteImage; @@ -1769,15 +1769,15 @@ void JKQTPRGBMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftS if (rgbMode==JKQTPRGBMathImageModeRGBMode) { d.palette=JKQTPMathImageRED; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeCMYMode) { d.palette=JKQTPMathImageINVERTED_CYANWHITE; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeHSVMode || rgbMode==JKQTPRGBMathImageModeHSLMode) { d.palette=JKQTPMathImageHSV; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } l<(pd, 1, pd_size, d.paletteImage, d.palette, 0, 199); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, 199); if (rgbMode==JKQTPRGBMathImageModeRGBMode) { d.palette=JKQTPMathImageGREEN; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeCMYMode) { d.palette=JKQTPMathImageINVERTED_MAGENTAWHITE; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeHSVMode) { d.palette=JKQTPMathImageGRAY; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - //JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); + //JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); QRgb* line=(QRgb*)(d.paletteImage.scanLine(0)); for (int i=0; i(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); + //JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); QRgb* line=(QRgb*)(d.paletteImage.scanLine(0)); for (int i=0; i(pd, 1, pd_size, d.paletteImage, d.palette, 0, 199); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, 199); if (rgbMode==JKQTPRGBMathImageModeRGBMode) { d.palette=JKQTPMathImageBLUE; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeCMYMode) { d.palette=JKQTPMathImageINVERTED_YELLOWWHITE; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); + JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, d.palette, 0, pd_size-1); } else if (rgbMode==JKQTPRGBMathImageModeHSVMode) { d.palette=JKQTPMathImageGRAY; d.paletteImage=QImage(1, pd_size, QImage::Format_ARGB32); - //JKQTPimagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); + //JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); QRgb* line=(QRgb*)(d.paletteImage.scanLine(0)); for (int i=0; i(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); + //JKQTPImagePlot_array2image(pd, 1, pd_size, d.paletteImage, l[li].palette, 0, pd_size-1); QRgb* line=(QRgb*)(d.paletteImage.scanLine(0)); for (int i=0; i((double*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((double*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((double*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((double*)dataG, Nx, Ny); break; case JKQTPMathImageBase::FloatArray: - imin= JKQTPimagePlot_getImageMin((float*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((float*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((float*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((float*)dataG, Nx, Ny); break; case JKQTPMathImageBase::UInt8Array: - imin= JKQTPimagePlot_getImageMin((uint8_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint8_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint8_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint8_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::UInt16Array: - imin= JKQTPimagePlot_getImageMin((uint16_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint16_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint16_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint16_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::UInt32Array: - imin= JKQTPimagePlot_getImageMin((uint32_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint32_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint32_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint32_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::UInt64Array: - imin= JKQTPimagePlot_getImageMin((uint64_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint64_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint64_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint64_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::Int8Array: - imin= JKQTPimagePlot_getImageMin((int8_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int8_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int8_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int8_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::Int16Array: - imin= JKQTPimagePlot_getImageMin((int16_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int16_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int16_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int16_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::Int32Array: - imin= JKQTPimagePlot_getImageMin((int32_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int32_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int32_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int32_t*)dataG, Nx, Ny); break; case JKQTPMathImageBase::Int64Array: - imin= JKQTPimagePlot_getImageMin((int64_t*)dataG, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int64_t*)dataG, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int64_t*)dataG, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int64_t*)dataG, Nx, Ny); break; } } else { @@ -2031,44 +2031,44 @@ void JKQTPRGBMathImage::getDataMinMaxB(double& imin, double& imax) { if (!dataG) return; switch(datatype) { case JKQTPMathImageBase::DoubleArray: - imin= JKQTPimagePlot_getImageMin((double*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((double*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((double*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((double*)dataB, Nx, Ny); break; case JKQTPMathImageBase::FloatArray: - imin= JKQTPimagePlot_getImageMin((float*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((float*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((float*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((float*)dataB, Nx, Ny); break; case JKQTPMathImageBase::UInt8Array: - imin= JKQTPimagePlot_getImageMin((uint8_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint8_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint8_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint8_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::UInt16Array: - imin= JKQTPimagePlot_getImageMin((uint16_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint16_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint16_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint16_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::UInt32Array: - imin= JKQTPimagePlot_getImageMin((uint32_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint32_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint32_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint32_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::UInt64Array: - imin= JKQTPimagePlot_getImageMin((uint64_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((uint64_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((uint64_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((uint64_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::Int8Array: - imin= JKQTPimagePlot_getImageMin((int8_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int8_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int8_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int8_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::Int16Array: - imin= JKQTPimagePlot_getImageMin((int16_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int16_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int16_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int16_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::Int32Array: - imin= JKQTPimagePlot_getImageMin((int32_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int32_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int32_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int32_t*)dataB, Nx, Ny); break; case JKQTPMathImageBase::Int64Array: - imin= JKQTPimagePlot_getImageMin((int64_t*)dataB, Nx, Ny); - imax= JKQTPimagePlot_getImageMax((int64_t*)dataB, Nx, Ny); + imin= JKQTPImagePlot_getImageMin((int64_t*)dataB, Nx, Ny); + imax= JKQTPImagePlot_getImageMax((int64_t*)dataB, Nx, Ny); break; } } else { @@ -2104,7 +2104,7 @@ double JKQTPRGBMathImage::getValueAt(double x, double y, int channel) void JKQTPRGBMathImage::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) { - painter.drawImage(rect, QPixmap(":/JKQTPlotter/jkqtp_plot_rgbimage.png").toImage()); + painter.drawImage(rect, QPixmap(":/JKQTPLotter/jkqtp_plot_rgbimage.png").toImage()); } void JKQTPRGBMathImage::set_title(const QString &title) @@ -2190,46 +2190,46 @@ QImage JKQTPRGBMathImage::drawImage() { int palette = 0; if (data) { switch(datatype) { - case JKQTPMathImageBase::DoubleArray: JKQTPimagePlot_array2RGBimage((double*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::FloatArray: JKQTPimagePlot_array2RGBimage((float*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::UInt8Array: JKQTPimagePlot_array2RGBimage((uint8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::UInt16Array: JKQTPimagePlot_array2RGBimage((uint16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::UInt32Array: JKQTPimagePlot_array2RGBimage((uint32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::UInt64Array: JKQTPimagePlot_array2RGBimage((uint64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::Int8Array: JKQTPimagePlot_array2RGBimage((int8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::Int16Array: JKQTPimagePlot_array2RGBimage((int16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::Int32Array: JKQTPimagePlot_array2RGBimage((int32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; - case JKQTPMathImageBase::Int64Array: JKQTPimagePlot_array2RGBimage((int64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::DoubleArray: JKQTPImagePlot_array2RGBimage((double*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::FloatArray: JKQTPImagePlot_array2RGBimage((float*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::UInt8Array: JKQTPImagePlot_array2RGBimage((uint8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::UInt16Array: JKQTPImagePlot_array2RGBimage((uint16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::UInt32Array: JKQTPImagePlot_array2RGBimage((uint32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::UInt64Array: JKQTPImagePlot_array2RGBimage((uint64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::Int8Array: JKQTPImagePlot_array2RGBimage((int8_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::Int16Array: JKQTPImagePlot_array2RGBimage((int16_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::Int32Array: JKQTPImagePlot_array2RGBimage((int32_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; + case JKQTPMathImageBase::Int64Array: JKQTPImagePlot_array2RGBimage((int64_t*)data, Nx, Ny, img, palette, internalDataMin, internalDataMax, rgbMode); break; } } palette = 1; if (dataG) { switch(datatypeG) { - case JKQTPMathImageBase::DoubleArray: JKQTPimagePlot_array2RGBimage((double*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::FloatArray: JKQTPimagePlot_array2RGBimage((float*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::UInt8Array: JKQTPimagePlot_array2RGBimage((uint8_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::UInt16Array: JKQTPimagePlot_array2RGBimage((uint16_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::UInt32Array: JKQTPimagePlot_array2RGBimage((uint32_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::UInt64Array: JKQTPimagePlot_array2RGBimage((uint64_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::Int8Array: JKQTPimagePlot_array2RGBimage((int8_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::Int16Array: JKQTPimagePlot_array2RGBimage((int16_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::Int32Array: JKQTPimagePlot_array2RGBimage((int32_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; - case JKQTPMathImageBase::Int64Array: JKQTPimagePlot_array2RGBimage((int64_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::DoubleArray: JKQTPImagePlot_array2RGBimage((double*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::FloatArray: JKQTPImagePlot_array2RGBimage((float*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::UInt8Array: JKQTPImagePlot_array2RGBimage((uint8_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::UInt16Array: JKQTPImagePlot_array2RGBimage((uint16_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::UInt32Array: JKQTPImagePlot_array2RGBimage((uint32_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::UInt64Array: JKQTPImagePlot_array2RGBimage((uint64_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::Int8Array: JKQTPImagePlot_array2RGBimage((int8_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::Int16Array: JKQTPImagePlot_array2RGBimage((int16_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::Int32Array: JKQTPImagePlot_array2RGBimage((int32_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; + case JKQTPMathImageBase::Int64Array: JKQTPImagePlot_array2RGBimage((int64_t*)dataG, Nx, Ny, img, palette, internalDataMinG, internalDataMaxG, rgbMode); break; } } palette = 2; if (dataB) { switch(datatypeB) { - case JKQTPMathImageBase::DoubleArray: JKQTPimagePlot_array2RGBimage((double*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::FloatArray: JKQTPimagePlot_array2RGBimage((float*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::UInt8Array: JKQTPimagePlot_array2RGBimage((uint8_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::UInt16Array: JKQTPimagePlot_array2RGBimage((uint16_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::UInt32Array: JKQTPimagePlot_array2RGBimage((uint32_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::UInt64Array: JKQTPimagePlot_array2RGBimage((uint64_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::Int8Array: JKQTPimagePlot_array2RGBimage((int8_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::Int16Array: JKQTPimagePlot_array2RGBimage((int16_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::Int32Array: JKQTPimagePlot_array2RGBimage((int32_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; - case JKQTPMathImageBase::Int64Array: JKQTPimagePlot_array2RGBimage((int64_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::DoubleArray: JKQTPImagePlot_array2RGBimage((double*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::FloatArray: JKQTPImagePlot_array2RGBimage((float*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::UInt8Array: JKQTPImagePlot_array2RGBimage((uint8_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::UInt16Array: JKQTPImagePlot_array2RGBimage((uint16_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::UInt32Array: JKQTPImagePlot_array2RGBimage((uint32_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::UInt64Array: JKQTPImagePlot_array2RGBimage((uint64_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::Int8Array: JKQTPImagePlot_array2RGBimage((int8_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::Int16Array: JKQTPImagePlot_array2RGBimage((int16_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::Int32Array: JKQTPImagePlot_array2RGBimage((int32_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; + case JKQTPMathImageBase::Int64Array: JKQTPImagePlot_array2RGBimage((int64_t*)dataB, Nx, Ny, img, palette, internalDataMinB, internalDataMaxB, rgbMode); break; } } @@ -2277,7 +2277,7 @@ void JKQTPRGBMathImage::set_data(void *data, void *dataG, void *dataB, uint32_t -JKQTPColumnMathImage::JKQTPColumnMathImage(JKQtBasePlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(JKQTBasePlotter *parent): JKQTPMathImage(parent) { this->modifierColumn=-1; @@ -2285,7 +2285,7 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(JKQtBasePlotter *parent): this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) { this->modifierColumn=-1; @@ -2293,7 +2293,7 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtBasePlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTBasePlotter *parent): JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,palette,parent) { this->modifierColumn=-1; @@ -2301,7 +2301,7 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(JKQtPlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(JKQTPLotter *parent): JKQTPMathImage(parent) { this->modifierColumn=-1; @@ -2309,7 +2309,7 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(JKQtPlotter *parent): this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) { this->modifierColumn=-1; @@ -2317,14 +2317,14 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtPlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTPLotter *parent): JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,palette,parent) { this->modifierColumn=-1; this->imageColumn=imageColumn; this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) { this->modifierColumn=-1; @@ -2357,13 +2357,13 @@ void JKQTPColumnMathImage::ensureImageData() } } -JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQtBasePlotter *parent): +JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQTBasePlotter *parent): JKQTPOverlayImageEnhanced(parent) { imageColumn=-1; } -JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQtPlotter *parent): +JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQTPLotter *parent): JKQTPOverlayImageEnhanced(parent) { imageColumn=-1; @@ -2386,7 +2386,7 @@ bool JKQTPColumnOverlayImageEnhanced::usesColumn(int c) const return (c==imageColumn); } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQtBasePlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTBasePlotter *parent): JKQTPRGBMathImage(0,0,0,0,DoubleArray,nullptr,0,0,parent) { this->modifierColumn=-1; @@ -2396,7 +2396,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQtBasePlotter *parent): this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2406,7 +2406,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2416,7 +2416,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2426,7 +2426,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2436,7 +2436,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQtPlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTPLotter *parent): JKQTPRGBMathImage(0,0,0,0,DoubleArray,nullptr,0,0,parent) { this->modifierColumn=-1; @@ -2446,7 +2446,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQtPlotter *parent): this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2456,7 +2456,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2466,7 +2466,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2476,7 +2476,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->datatype=JKQTPMathImageBase::DoubleArray; } -JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter *parent): +JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter *parent): JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) { this->modifierColumn=-1; @@ -2509,34 +2509,34 @@ QVector JKQTPRGBMathImage::getDataGAsDoubleVector() const { switch(datatype) { case JKQTPMathImageBase::DoubleArray: - return JKQTPimagePlot_arrayToDVector((double*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((double*)dataG, Nx*Ny); break; case JKQTPMathImageBase::FloatArray: - return JKQTPimagePlot_arrayToDVector((float*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((float*)dataG, Nx*Ny); break; case JKQTPMathImageBase::UInt8Array: - return JKQTPimagePlot_arrayToDVector((uint8_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint8_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::UInt16Array: - return JKQTPimagePlot_arrayToDVector((uint16_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint16_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::UInt32Array: - return JKQTPimagePlot_arrayToDVector((uint32_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint32_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::UInt64Array: - return JKQTPimagePlot_arrayToDVector((uint64_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint64_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::Int8Array: - return JKQTPimagePlot_arrayToDVector((int8_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int8_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::Int16Array: - return JKQTPimagePlot_arrayToDVector((int16_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int16_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::Int32Array: - return JKQTPimagePlot_arrayToDVector((int32_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int32_t*)dataG, Nx*Ny); break; case JKQTPMathImageBase::Int64Array: - return JKQTPimagePlot_arrayToDVector((int64_t*)dataG, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int64_t*)dataG, Nx*Ny); break; } QVector res; @@ -2547,34 +2547,34 @@ QVector JKQTPRGBMathImage::getDataBAsDoubleVector() const { switch(datatype) { case JKQTPMathImageBase::DoubleArray: - return JKQTPimagePlot_arrayToDVector((double*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((double*)dataB, Nx*Ny); break; case JKQTPMathImageBase::FloatArray: - return JKQTPimagePlot_arrayToDVector((float*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((float*)dataB, Nx*Ny); break; case JKQTPMathImageBase::UInt8Array: - return JKQTPimagePlot_arrayToDVector((uint8_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint8_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::UInt16Array: - return JKQTPimagePlot_arrayToDVector((uint16_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint16_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::UInt32Array: - return JKQTPimagePlot_arrayToDVector((uint32_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint32_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::UInt64Array: - return JKQTPimagePlot_arrayToDVector((uint64_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((uint64_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::Int8Array: - return JKQTPimagePlot_arrayToDVector((int8_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int8_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::Int16Array: - return JKQTPimagePlot_arrayToDVector((int16_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int16_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::Int32Array: - return JKQTPimagePlot_arrayToDVector((int32_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int32_t*)dataB, Nx*Ny); break; case JKQTPMathImageBase::Int64Array: - return JKQTPimagePlot_arrayToDVector((int64_t*)dataB, Nx*Ny); + return JKQTPImagePlot_arrayToDVector((int64_t*)dataB, Nx*Ny); break; } QVector res; @@ -2586,7 +2586,7 @@ QVector JKQTPRGBMathImage::getDataBAsDoubleVector() const QVector JKQTPOverlayImage::getDataAsDoubleVector() const { - return JKQTPimagePlot_BarrayToDVector(data, Nx*Ny); + return JKQTPImagePlot_BarrayToDVector(data, Nx*Ny); } @@ -2600,7 +2600,7 @@ void JKQTPOverlayImage::set_title(const QString &title) } -void JKQTPOverlayImage::setParent(JKQtBasePlotter *parent) +void JKQTPOverlayImage::setParent(JKQTBasePlotter *parent) { if (this->parent) { this->parent->deregisterAdditionalAction(actSaveImage); @@ -2907,7 +2907,7 @@ bool JKQTPContour::intersect(QLineF &line, const QVector3D &vertex1,const QVecto } -JKQTPContour::JKQTPContour(JKQtBasePlotter *parent) : +JKQTPContour::JKQTPContour(JKQTBasePlotter *parent) : JKQTPMathImage(parent) { lineColor=QColor("red"); @@ -2925,7 +2925,7 @@ JKQTPContour::JKQTPContour(JKQtBasePlotter *parent) : } } -JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQtBasePlotter* parent) : +JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQTBasePlotter* parent) : JKQTPMathImage( x, y, width, height, datatype, data, Nx, Ny, palette, parent) { lineColor=QColor("red"); @@ -2939,7 +2939,7 @@ JKQTPContour::JKQTPContour(double x, double y, double width, double height, void } -JKQTPContour::JKQTPContour(JKQtPlotter *parent) : +JKQTPContour::JKQTPContour(JKQTPLotter *parent) : JKQTPMathImage(parent) { lineColor=QColor("red"); @@ -2957,7 +2957,7 @@ JKQTPContour::JKQTPContour(JKQtPlotter *parent) : } } -JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQtPlotter* parent) : +JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQTPLotter* parent) : JKQTPMathImage( x, y, width, height, datatype, data, Nx, Ny, palette, parent) { lineColor=QColor("red"); diff --git a/lib/jkqtplotter/jkqtpgraphsimage.h b/lib/jkqtplotter/jkqtpgraphsimage.h index ecd6dbe7ea..72cd7552d3 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.h +++ b/lib/jkqtplotter/jkqtpgraphsimage.h @@ -42,17 +42,17 @@ /*! \brief base class for plotting an image \ingroup jkqtplotter_imagelots_elements */ -class LIB_EXPORT JKQTPImageBase: public JKQTPgraph { +class LIB_EXPORT JKQTPImageBase: public JKQTPGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPImageBase(JKQtBasePlotter* parent=nullptr); + JKQTPImageBase(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPImageBase(double x, double y, double width, double height, JKQtBasePlotter* parent=nullptr); + JKQTPImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPImageBase(JKQtPlotter* parent); + JKQTPImageBase(JKQTPLotter* parent); /** \brief class constructor */ - JKQTPImageBase(double x, double y, double width, double height, JKQtPlotter* parent); + JKQTPImageBase(double x, double y, double width, double height, JKQTPLotter* parent); /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; @@ -197,15 +197,15 @@ class LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { /** \brief class constructor */ - JKQTPMathImageBase(JKQtBasePlotter* parent=nullptr); - JKQTPMathImageBase(double x, double y, double width, double height, JKQtBasePlotter* parent=nullptr); - JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); + JKQTPMathImageBase(JKQTBasePlotter* parent=nullptr); + JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr); + JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPMathImageBase(JKQtPlotter* parent); - JKQTPMathImageBase(double x, double y, double width, double height, JKQtPlotter* parent=nullptr); - JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); + JKQTPMathImageBase(JKQTPLotter* parent); + JKQTPMathImageBase(double x, double y, double width, double height, JKQTPLotter* parent=nullptr); + JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; @@ -361,17 +361,17 @@ class LIB_EXPORT JKQTPImage: public JKQTPImageBase { public: /** \brief class constructor */ - JKQTPImage(JKQtBasePlotter* parent=nullptr); + JKQTPImage(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPImage(JKQtPlotter* parent); + JKQTPImage(JKQTPLotter* parent); /** \brief class constructor, which points to an external image (not owned by this object!!!) */ - JKQTPImage(double x, double y, double width, double height, QImage* image, JKQtBasePlotter* parent=nullptr); + JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTBasePlotter* parent=nullptr); /** \brief class constructor, which points to an external image (not owned by this object!!!) */ - JKQTPImage(double x, double y, double width, double height, QImage* image, JKQtPlotter* parent); + JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTPLotter* parent); /** \brief class constructor, which generates an internal image object, by copying \a image */ - JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQtBasePlotter* parent=nullptr); + JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTBasePlotter* parent=nullptr); /** \brief class constructor, which generates an internal image object, by copying \a image */ - JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQtPlotter* parent); + JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTPLotter* parent); virtual ~JKQTPImage() override; @@ -404,7 +404,7 @@ class LIB_EXPORT JKQTPImage: public JKQTPImageBase { QAction* actSaveImage; QAction* actCopyImage; public: - virtual void setParent(JKQtBasePlotter* parent) override; + virtual void setParent(JKQTBasePlotter* parent) override; virtual void set_title(const QString& title) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); @@ -427,15 +427,15 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { public: /** \brief class constructor */ - JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQtBasePlotter* parent=nullptr); - JKQTPMathImage(JKQtBasePlotter* parent=nullptr); - JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtPlotter* parent); - JKQTPMathImage(JKQtPlotter* parent); + JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr); + JKQTPMathImage(JKQTBasePlotter* parent=nullptr); + JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTPLotter* parent); + JKQTPMathImage(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - virtual void setParent(JKQtBasePlotter* parent) override; + virtual void setParent(JKQTBasePlotter* parent) override; /*! \brief get list with all available palettes */ static QStringList getPalettes() ; @@ -713,13 +713,13 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { return this->imageNameFontSize; } /*! \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis
. \see colorBarRightAxis for more information */ - inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } + inline JKQTPVerticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } /*! \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis
. \see colorBarTopAxis for more information */ - inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } + inline JKQTPHorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } /*! \brief returns the property modifierColorBarTopAxis. \details Description of the parameter modifierColorBarTopAxis is:
\copybrief modifierColorBarTopAxis
. \see modifierColorBarTopAxis for more information */ - inline JKQTPverticalIndependentAxis* get_modifierColorBarTopAxis() const { return this->modifierColorBarTopAxis; } + inline JKQTPVerticalIndependentAxis* get_modifierColorBarTopAxis() const { return this->modifierColorBarTopAxis; } /*! \brief returns the property modifierColorBarRightAxis . \details Description of the parameter modifierColorBarRightAxis is:
\copybrief modifierColorBarRightAxis
. \see modifierColorBarRightAxis for more information */ - inline JKQTPhorizontalIndependentAxis* get_modifierColorBarRightAxis() const { return this->modifierColorBarRightAxis ; } + inline JKQTPHorizontalIndependentAxis* get_modifierColorBarRightAxis() const { return this->modifierColorBarRightAxis ; } /*! \brief sets the property colorBarTopVisible to the specified \a __value. \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible
\see colorBarTopVisible for more information */ @@ -879,10 +879,10 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { * * \note this axis has some kind of a special role. It is used to format color bar axes */ - JKQTPverticalIndependentAxis* colorBarRightAxis; - JKQTPhorizontalIndependentAxis* colorBarTopAxis; - JKQTPverticalIndependentAxis* modifierColorBarTopAxis; - JKQTPhorizontalIndependentAxis* modifierColorBarRightAxis; + JKQTPVerticalIndependentAxis* colorBarRightAxis; + JKQTPHorizontalIndependentAxis* colorBarTopAxis; + JKQTPVerticalIndependentAxis* modifierColorBarTopAxis; + JKQTPHorizontalIndependentAxis* modifierColorBarRightAxis; protected: QAction* actSaveImage; @@ -917,21 +917,21 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { /** \brief class constructor */ - JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); + JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); + JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); /** \brief class constructor */ - JKQTPRGBMathImage(JKQtBasePlotter* parent=nullptr); + JKQTPRGBMathImage(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPRGBMathImage(JKQtPlotter* parent); + JKQTPRGBMathImage(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - virtual void setParent(JKQtBasePlotter* parent) override; + virtual void setParent(JKQTBasePlotter* parent) override; @@ -1236,17 +1236,17 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { return this->imageNameFontSize; } /*! \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis
. \see colorBarRightAxis for more information */ - inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } + inline JKQTPVerticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } /*! \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis
. \see colorBarTopAxis for more information */ - inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } + inline JKQTPHorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } /*! \brief returns the property colorBarRightAxisG. \details Description of the parameter colorBarRightAxisG is:
\copybrief colorBarRightAxisG
. \see colorBarRightAxisG for more information */ - inline JKQTPverticalIndependentAxis* get_colorBarRightAxisG() const { return this->colorBarRightAxisG; } + inline JKQTPVerticalIndependentAxis* get_colorBarRightAxisG() const { return this->colorBarRightAxisG; } /*! \brief returns the property colorBarTopAxisG. \details Description of the parameter colorBarTopAxisG is:
\copybrief colorBarTopAxisG
. \see colorBarTopAxisG for more information */ - inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxisG() const { return this->colorBarTopAxisG; } + inline JKQTPHorizontalIndependentAxis* get_colorBarTopAxisG() const { return this->colorBarTopAxisG; } /*! \brief returns the property colorBarRightAxisB. \details Description of the parameter colorBarRightAxisB is:
\copybrief colorBarRightAxisB
. \see colorBarRightAxisB for more information */ - inline JKQTPverticalIndependentAxis* get_colorBarRightAxisB() const { return this->colorBarRightAxisB; } + inline JKQTPVerticalIndependentAxis* get_colorBarRightAxisB() const { return this->colorBarRightAxisB; } /*! \brief returns the property colorBarTopAxisB. \details Description of the parameter colorBarTopAxisB is:
\copybrief colorBarTopAxisB
. \see colorBarTopAxisB for more information */ - inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxisB() const { return this->colorBarTopAxisB; } + inline JKQTPHorizontalIndependentAxis* get_colorBarTopAxisB() const { return this->colorBarTopAxisB; } /*! \brief sets the property colorBarTopVisible to the specified \a __value. \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible
\see colorBarTopVisible for more information */ @@ -1394,12 +1394,12 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { * * \note this axis has some kind of a special role. It is used to format color bar axes */ - JKQTPverticalIndependentAxis* colorBarRightAxis; - JKQTPhorizontalIndependentAxis* colorBarTopAxis; - JKQTPverticalIndependentAxis* colorBarRightAxisG; - JKQTPhorizontalIndependentAxis* colorBarTopAxisG; - JKQTPverticalIndependentAxis* colorBarRightAxisB; - JKQTPhorizontalIndependentAxis* colorBarTopAxisB; + JKQTPVerticalIndependentAxis* colorBarRightAxis; + JKQTPHorizontalIndependentAxis* colorBarTopAxis; + JKQTPVerticalIndependentAxis* colorBarRightAxisG; + JKQTPHorizontalIndependentAxis* colorBarTopAxisG; + JKQTPVerticalIndependentAxis* colorBarRightAxisB; + JKQTPHorizontalIndependentAxis* colorBarTopAxisB; double internalDataMinG; @@ -1433,14 +1433,14 @@ class LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { public: /** \brief class constructor */ - JKQTPColumnMathImage(JKQtBasePlotter* parent=nullptr); - JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); - JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQtBasePlotter* parent=nullptr); + JKQTPColumnMathImage(JKQTBasePlotter* parent=nullptr); + JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); + JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPColumnMathImage(JKQtPlotter* parent); - JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtPlotter* parent); - JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); + JKQTPColumnMathImage(JKQTPLotter* parent); + JKQTPColumnMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); + JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQTPLotter* parent); + JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); /*! \brief sets the property imageColumn to the specified \a __value. \details Description of the parameter imageColumn is:
\copybrief imageColumn
@@ -1471,7 +1471,7 @@ class LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { return this->modifierColumn; } - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; @@ -1497,17 +1497,17 @@ class LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage { public: /** \brief class constructor */ - JKQTPColumnRGBMathImage(JKQtBasePlotter* parent=nullptr); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQtBasePlotter* parent=nullptr); + JKQTPColumnRGBMathImage(JKQTBasePlotter* parent=nullptr); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPColumnRGBMathImage(JKQtPlotter* parent); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); + JKQTPColumnRGBMathImage(JKQTPLotter* parent); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); + JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQTPLotter* parent); /*! \brief sets the property imageRColumn to the specified \a __value. \details Description of the parameter imageRColumn is:
\copybrief imageRColumn
@@ -1565,7 +1565,7 @@ class LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage { { return this->modifierColumn; } - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: @@ -1591,12 +1591,12 @@ class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase { public: /** \brief class constructor */ - JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtBasePlotter* parent=nullptr); - JKQTPOverlayImage(JKQtBasePlotter* parent=nullptr); + JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTBasePlotter* parent=nullptr); + JKQTPOverlayImage(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtPlotter* parent); - JKQTPOverlayImage(JKQtPlotter* parent); + JKQTPOverlayImage(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTPLotter* parent); + JKQTPOverlayImage(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -1702,7 +1702,7 @@ class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase { QAction* actCopyImage; public: virtual void set_title(const QString& title) override; - virtual void setParent(JKQtBasePlotter* parent) override; + virtual void setParent(JKQTBasePlotter* parent) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void copyImagePlotAsImage(); @@ -1722,11 +1722,11 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage { Q_OBJECT public: /** \brief class constructor */ - JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtBasePlotter* parent=nullptr); - JKQTPOverlayImageEnhanced(JKQtBasePlotter* parent=nullptr); + JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTBasePlotter* parent=nullptr); + JKQTPOverlayImageEnhanced(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQtPlotter* parent); - JKQTPOverlayImageEnhanced(JKQtPlotter* parent); + JKQTPOverlayImageEnhanced(double x, double y, double width, double height, bool* data, uint32_t Nx, uint32_t Ny, QColor colTrue, JKQTPLotter* parent); + JKQTPOverlayImageEnhanced(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -1736,14 +1736,14 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage { /*! \brief sets the property symbol to the specified \a __value. \details Description of the parameter symbol is:
\copybrief symbol
\see symbol for more information */ - inline virtual void set_symbol(const JKQTPgraphSymbols & __value) + inline virtual void set_symbol(const JKQTPGraphSymbols & __value) { this->symbol = __value; } /*! \brief returns the property symbol. \details Description of the parameter symbol is:
\copybrief symbol
\see symbol for more information */ - inline virtual JKQTPgraphSymbols get_symbol() const + inline virtual JKQTPGraphSymbols get_symbol() const { return this->symbol; } @@ -1806,7 +1806,7 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage { protected: /** \brief which symbol to use for the datapoints */ - JKQTPgraphSymbols symbol; + JKQTPGraphSymbols symbol; /** \brief width (in pixels) of the lines used to plot the symbol for the data points */ double symbolWidth; @@ -1834,8 +1834,8 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage { class LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanced { Q_OBJECT public: - JKQTPColumnOverlayImageEnhanced(JKQtBasePlotter* parent=nullptr); - JKQTPColumnOverlayImageEnhanced(JKQtPlotter* parent); + JKQTPColumnOverlayImageEnhanced(JKQTBasePlotter* parent=nullptr); + JKQTPColumnOverlayImageEnhanced(JKQTPLotter* parent); /*! \brief sets the property imageColumn to the specified \a __value. \details Description of the parameter imageColumn is:
\copybrief imageColumn
@@ -1854,7 +1854,7 @@ class LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanc /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - /** \copydoc JKQTPgraph::usesColumn() */ + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; @@ -1887,13 +1887,13 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { Q_OBJECT public: /** \brief class constructor */ - JKQTPContour(JKQtBasePlotter* parent=nullptr); + JKQTPContour(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, DataType datatype = JKQTPMathImageBase::DoubleArray, JKQtBasePlotter* parent=nullptr); + JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, DataType datatype = JKQTPMathImageBase::DoubleArray, JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPContour(JKQtPlotter* parent); + JKQTPContour(JKQTPLotter* parent); /** \brief class constructor */ - JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype , JKQtPlotter* parent); + JKQTPContour(double x, double y, double width, double height, void* data, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, DataType datatype , JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -2014,7 +2014,7 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { { return this->relativeLevels; } - /** convenience function to work with JKQTPdatastore */ + /** convenience function to work with JKQTPDatastore */ void set_imageColumn(size_t columnID); void addContourLevel(double &level); diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp index dc3e83cafc..07c47f76b9 100644 --- a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp @@ -34,8 +34,8 @@ -JKQTPimpulsesHorizontalGraph::JKQTPimpulsesHorizontalGraph(JKQtBasePlotter* parent): - JKQTPxyGraph(parent) +JKQTPImpulsesHorizontalGraph::JKQTPImpulsesHorizontalGraph(JKQTBasePlotter* parent): + JKQTPXYGraph(parent) { baseline=0; color=QColor("red"); @@ -48,8 +48,8 @@ JKQTPimpulsesHorizontalGraph::JKQTPimpulsesHorizontalGraph(JKQtBasePlotter* pare } } -JKQTPimpulsesHorizontalGraph::JKQTPimpulsesHorizontalGraph(JKQtPlotter* parent): - JKQTPxyGraph(parent) +JKQTPImpulsesHorizontalGraph::JKQTPImpulsesHorizontalGraph(JKQTPLotter* parent): + JKQTPXYGraph(parent) { baseline=0; color=QColor("red"); @@ -61,12 +61,12 @@ JKQTPimpulsesHorizontalGraph::JKQTPimpulsesHorizontalGraph(JKQtPlotter* parent): color=parent->getPlotStyle(parentPlotStyle).color(); } } -void JKQTPimpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPImpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPimpulsesHorizontalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPImpulsesHorizontalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -135,7 +135,7 @@ void JKQTPimpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { drawErrorsAfter(painter); } -void JKQTPimpulsesHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { +void JKQTPImpulsesHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { painter.save(); @@ -150,7 +150,7 @@ void JKQTPimpulsesHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, painter.restore(); } -QColor JKQTPimpulsesHorizontalGraph::getKeyLabelColor() { +QColor JKQTPImpulsesHorizontalGraph::getKeyLabelColor() { return color; } @@ -164,23 +164,23 @@ QColor JKQTPimpulsesHorizontalGraph::getKeyLabelColor() { -JKQTPimpulsesVerticalGraph::JKQTPimpulsesVerticalGraph(JKQtBasePlotter* parent): - JKQTPimpulsesHorizontalGraph(parent) +JKQTPImpulsesVerticalGraph::JKQTPImpulsesVerticalGraph(JKQTBasePlotter* parent): + JKQTPImpulsesHorizontalGraph(parent) { } -JKQTPimpulsesVerticalGraph::JKQTPimpulsesVerticalGraph(JKQtPlotter *parent): - JKQTPimpulsesHorizontalGraph(parent) +JKQTPImpulsesVerticalGraph::JKQTPImpulsesVerticalGraph(JKQTPLotter *parent): + JKQTPImpulsesHorizontalGraph(parent) { } -void JKQTPimpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { +void JKQTPImpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot("JKQTPimpulsesVerticalGraph::draw"); + JKQTPAutoOutputTimer jkaaot("JKQTPImpulsesVerticalGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; drawErrorsBefore(painter); @@ -253,7 +253,7 @@ void JKQTPimpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { -QPen JKQTPimpulsesHorizontalGraph::getPen(JKQTPEnhancedPainter& painter) const { +QPen JKQTPImpulsesHorizontalGraph::getPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); @@ -263,49 +263,49 @@ QPen JKQTPimpulsesHorizontalGraph::getPen(JKQTPEnhancedPainter& painter) const { -JKQTPimpulsesHorizontalErrorGraph::JKQTPimpulsesHorizontalErrorGraph(JKQtBasePlotter *parent): - JKQTPimpulsesHorizontalGraph(parent), JKQTPxGraphErrors() +JKQTPImpulsesHorizontalErrorGraph::JKQTPImpulsesHorizontalErrorGraph(JKQTBasePlotter *parent): + JKQTPImpulsesHorizontalGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPimpulsesHorizontalErrorGraph::JKQTPimpulsesHorizontalErrorGraph(JKQtPlotter *parent): - JKQTPimpulsesHorizontalGraph(parent), JKQTPxGraphErrors() +JKQTPImpulsesHorizontalErrorGraph::JKQTPImpulsesHorizontalErrorGraph(JKQTPLotter *parent): + JKQTPImpulsesHorizontalGraph(parent), JKQTPXGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPimpulsesHorizontalErrorGraph::usesColumn(int c) const +bool JKQTPImpulsesHorizontalErrorGraph::usesColumn(int c) const { - return JKQTPimpulsesHorizontalGraph::usesColumn(c)|| JKQTPxGraphErrors::errorUsesColumn(c); + return JKQTPImpulsesHorizontalGraph::usesColumn(c)|| JKQTPXGraphErrors::errorUsesColumn(c); } -void JKQTPimpulsesHorizontalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPImpulsesHorizontalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } -JKQTPimpulsesVerticalErrorGraph::JKQTPimpulsesVerticalErrorGraph(JKQtBasePlotter *parent): - JKQTPimpulsesVerticalGraph(parent), JKQTPyGraphErrors() +JKQTPImpulsesVerticalErrorGraph::JKQTPImpulsesVerticalErrorGraph(JKQTBasePlotter *parent): + JKQTPImpulsesVerticalGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -JKQTPimpulsesVerticalErrorGraph::JKQTPimpulsesVerticalErrorGraph(JKQtPlotter *parent): - JKQTPimpulsesVerticalGraph(parent), JKQTPyGraphErrors() +JKQTPImpulsesVerticalErrorGraph::JKQTPImpulsesVerticalErrorGraph(JKQTPLotter *parent): + JKQTPImpulsesVerticalGraph(parent), JKQTPYGraphErrors() { setErrorColorFromGraphColor(color); } -bool JKQTPimpulsesVerticalErrorGraph::usesColumn(int c) const +bool JKQTPImpulsesVerticalErrorGraph::usesColumn(int c) const { - return JKQTPimpulsesVerticalGraph::usesColumn(c)|| JKQTPyGraphErrors::errorUsesColumn(c); + return JKQTPImpulsesVerticalGraph::usesColumn(c)|| JKQTPYGraphErrors::errorUsesColumn(c); } -void JKQTPimpulsesVerticalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) +void JKQTPImpulsesVerticalErrorGraph::drawErrorsAfter(JKQTPEnhancedPainter &painter) { - if (sortData==JKQTPxyGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); + if (sortData==JKQTPXYGraph::Unsorted) plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end); else plotErrorIndicators(painter, parent, this, xColumn, yColumn, datarange_start, datarange_end, 0, 0, &sortedIndices); } diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.h b/lib/jkqtplotter/jkqtpgraphsimpulses.h index 5773150d9d..9a638cdf29 100644 --- a/lib/jkqtplotter/jkqtpgraphsimpulses.h +++ b/lib/jkqtplotter/jkqtpgraphsimpulses.h @@ -31,13 +31,13 @@ \image html plot_impulsesxplots.png */ -class LIB_EXPORT JKQTPimpulsesHorizontalGraph: public JKQTPxyGraph { +class LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPimpulsesHorizontalGraph(JKQtBasePlotter* parent=nullptr); + JKQTPImpulsesHorizontalGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPimpulsesHorizontalGraph(JKQtPlotter* parent); + JKQTPImpulsesHorizontalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -95,7 +95,7 @@ class LIB_EXPORT JKQTPimpulsesHorizontalGraph: public JKQTPxyGraph { double lineWidth; protected: - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTPLotterBase::getPlotStyle() and JKQTPLotterBase::getNextStyle() ) */ int parentPlotStyle; /** \brief baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!) @@ -111,13 +111,13 @@ class LIB_EXPORT JKQTPimpulsesHorizontalGraph: public JKQTPxyGraph { \image html plot_impulsesxerrorsplots.png */ -class LIB_EXPORT JKQTPimpulsesHorizontalErrorGraph: public JKQTPimpulsesHorizontalGraph, public JKQTPxGraphErrors { +class LIB_EXPORT JKQTPImpulsesHorizontalErrorGraph: public JKQTPImpulsesHorizontalGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPimpulsesHorizontalErrorGraph(JKQtBasePlotter* parent=nullptr); - JKQTPimpulsesHorizontalErrorGraph(JKQtPlotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + JKQTPImpulsesHorizontalErrorGraph(JKQTBasePlotter* parent=nullptr); + JKQTPImpulsesHorizontalErrorGraph(JKQTPLotter* parent); + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: @@ -134,13 +134,13 @@ class LIB_EXPORT JKQTPimpulsesHorizontalErrorGraph: public JKQTPimpulsesHorizont \image html plot_impulsesyplots.png */ -class LIB_EXPORT JKQTPimpulsesVerticalGraph: public JKQTPimpulsesHorizontalGraph { +class LIB_EXPORT JKQTPImpulsesVerticalGraph: public JKQTPImpulsesHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPimpulsesVerticalGraph(JKQtBasePlotter* parent=nullptr); + JKQTPImpulsesVerticalGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPimpulsesVerticalGraph(JKQtPlotter* parent); + JKQTPImpulsesVerticalGraph(JKQTPLotter* parent); /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -153,14 +153,14 @@ class LIB_EXPORT JKQTPimpulsesVerticalGraph: public JKQTPimpulsesHorizontalGraph \image html plot_impulsesyerrorsplots.png */ -class LIB_EXPORT JKQTPimpulsesVerticalErrorGraph: public JKQTPimpulsesVerticalGraph, public JKQTPyGraphErrors { +class LIB_EXPORT JKQTPImpulsesVerticalErrorGraph: public JKQTPImpulsesVerticalGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ - JKQTPimpulsesVerticalErrorGraph(JKQtBasePlotter* parent=nullptr); + JKQTPImpulsesVerticalErrorGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPimpulsesVerticalErrorGraph(JKQtPlotter* parent); - /** \copydoc JKQTPgraph::usesColumn() */ + JKQTPImpulsesVerticalErrorGraph(JKQTPLotter* parent); + /** \copydoc JKQTPGraph::usesColumn() */ virtual bool usesColumn(int c) const override; protected: diff --git a/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp b/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp index 2f18826d63..54e9631e5e 100644 --- a/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp +++ b/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp @@ -27,8 +27,8 @@ #include -JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtBasePlotter *parent): - JKQTPxFunctionLineGraph(parent) +JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraph(JKQTBasePlotter *parent): + JKQTPXFunctionLineGraph(parent) { fdata.parser=new JKQTPMathParser(); fdata.node=nullptr; @@ -36,7 +36,7 @@ JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtBasePlotter *pa function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraphFunction); + set_plotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -44,11 +44,11 @@ JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtBasePlotter *pa errorFunction=""; errorParameterColumn=-1; set_errorParams(&efdata); - set_errorPlotFunction(&JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraphFunction); + set_errorPlotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); } -JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtPlotter *parent): - JKQTPxFunctionLineGraph(parent) +JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraph(JKQTPLotter *parent): + JKQTPXFunctionLineGraph(parent) { fdata.parser=new JKQTPMathParser(); fdata.node=nullptr; @@ -56,7 +56,7 @@ JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtPlotter *parent function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraphFunction); + set_plotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -64,10 +64,10 @@ JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraph(JKQtPlotter *parent errorFunction=""; errorParameterColumn=-1; set_errorParams(&efdata); - set_errorPlotFunction(&JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraphFunction); + set_errorPlotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); } -JKQTPxParsedFunctionLineGraph::~JKQTPxParsedFunctionLineGraph() +JKQTPXParsedFunctionLineGraph::~JKQTPXParsedFunctionLineGraph() { if (fdata.node) delete fdata.node; delete fdata.parser; @@ -76,7 +76,7 @@ JKQTPxParsedFunctionLineGraph::~JKQTPxParsedFunctionLineGraph() } -void JKQTPxParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) +void JKQTPXParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) { collectParameters(); @@ -130,13 +130,13 @@ void JKQTPxParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) } set_params(&fdata); - set_plotFunction(JKQTPxParsedFunctionLineGraphFunction); + set_plotFunction(JKQTPXParsedFunctionLineGraphFunction); set_errorParams(&efdata); - set_errorPlotFunction(JKQTPxParsedFunctionLineGraphFunction); + set_errorPlotFunction(JKQTPXParsedFunctionLineGraphFunction); //qint64 t=timer.elapsed(); - JKQTPxFunctionLineGraph::createPlotData(false); - //qDebug()<<"createPlotData(): JKQTPxFunctionLineGraph::createPlotData(): "<parser && d->node) { try { d->parser->addVariableDouble("x", x); @@ -190,8 +190,8 @@ double JKQTPxParsedFunctionLineGraph::JKQTPxParsedFunctionLineGraphFunction(doub -JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtBasePlotter *parent): - JKQTPyFunctionLineGraph(parent) +JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraph(JKQTBasePlotter *parent): + JKQTPYFunctionLineGraph(parent) { fdata.parser=new JKQTPMathParser(); fdata.node=nullptr; @@ -199,7 +199,7 @@ JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtBasePlotter *pa function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraphFunction); + set_plotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -207,11 +207,11 @@ JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtBasePlotter *pa errorFunction=""; errorParameterColumn=-1; set_errorParams(&efdata); - set_errorPlotFunction(&JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraphFunction); + set_errorPlotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); } -JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtPlotter *parent): - JKQTPyFunctionLineGraph(parent) +JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraph(JKQTPLotter *parent): + JKQTPYFunctionLineGraph(parent) { fdata.parser=new JKQTPMathParser(); fdata.node=nullptr; @@ -219,7 +219,7 @@ JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtPlotter *parent function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraphFunction); + set_plotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -227,10 +227,10 @@ JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraph(JKQtPlotter *parent errorFunction=""; errorParameterColumn=-1; set_errorParams(&efdata); - set_errorPlotFunction(&JKQTPyParsedFunctionLineGraph::JKQTPyParsedFunctionLineGraphFunction); + set_errorPlotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); } -JKQTPyParsedFunctionLineGraph::~JKQTPyParsedFunctionLineGraph() +JKQTPYParsedFunctionLineGraph::~JKQTPYParsedFunctionLineGraph() { if (fdata.node) delete fdata.node; delete fdata.parser; @@ -238,7 +238,7 @@ JKQTPyParsedFunctionLineGraph::~JKQTPyParsedFunctionLineGraph() delete efdata.parser; } -void JKQTPyParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) +void JKQTPYParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) { collectParameters(); @@ -294,13 +294,13 @@ void JKQTPyParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) } set_params(&fdata); - set_plotFunction(JKQTPyParsedFunctionLineGraphFunction); + set_plotFunction(JKQTPYParsedFunctionLineGraphFunction); set_errorParams(&efdata); - set_errorPlotFunction(JKQTPyParsedFunctionLineGraphFunction); + set_errorPlotFunction(JKQTPYParsedFunctionLineGraphFunction); //qint64 t=timer.elapsed(); - JKQTPyFunctionLineGraph::createPlotData(false); - //qDebug()<<"createPlotData(): JKQTPyFunctionLineGraph::createPlotData(): "<parser && d->node) { try { d->parser->addVariableDouble("x", x); diff --git a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h index 9bbfac3e39..e05e75c1ba 100644 --- a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h @@ -30,8 +30,8 @@ #include "jkqtplotter/jkqtpgraphsevaluatedfunction.h" // forward declarations -class JKQtBasePlotter; -class JKQtPlotter; +class JKQTBasePlotter; +class JKQTPLotter; @@ -43,19 +43,19 @@ class JKQtPlotter; Use the variable \c x in an equation to refer to the free parameter of the curve. */ -class LIB_EXPORT JKQTPxParsedFunctionLineGraph: public JKQTPxFunctionLineGraph { +class LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPxParsedFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + JKQTPXParsedFunctionLineGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPxParsedFunctionLineGraph(JKQtPlotter* parent); + JKQTPXParsedFunctionLineGraph(JKQTPLotter* parent); /** \brief class destructor */ - virtual ~JKQTPxParsedFunctionLineGraph() override; + virtual ~JKQTPXParsedFunctionLineGraph() override; /*! \brief sets the property function to the specified \a __value. \details Description of the parameter function is:
\copybrief function
@@ -90,7 +90,7 @@ class LIB_EXPORT JKQTPxParsedFunctionLineGraph: public JKQTPxFunctionLineGraph { /** \brief INTERNAL data structure * \internal */ - struct JKQTPxParsedFunctionLineGraphFunctionData { + struct JKQTPXParsedFunctionLineGraphFunctionData { JKQTPMathParser* parser; JKQTPMathParser::jkmpNode* node; int varcount; @@ -99,23 +99,23 @@ class LIB_EXPORT JKQTPxParsedFunctionLineGraph: public JKQTPxFunctionLineGraph { protected: /** \brief the function to be evaluated for the plot. Use \c x as the free variable, e.g. \c "x^2+2" */ QString function; - JKQTPxParsedFunctionLineGraphFunctionData fdata; + JKQTPXParsedFunctionLineGraphFunctionData fdata; /** \brief the function to be evaluated to add error indicators to the graph. This function is evaluated to an error for every x. Use \c x as the free variable, e.g. \c "x^2+2". */ QString errorFunction; - JKQTPxParsedFunctionLineGraphFunctionData efdata; + JKQTPXParsedFunctionLineGraphFunctionData efdata; // hide functions that should not be used in this class! - using JKQTPxFunctionLineGraph::set_plotFunction; - using JKQTPxFunctionLineGraph::set_params; - using JKQTPxFunctionLineGraph::set_errorPlotFunction; - using JKQTPxFunctionLineGraph::set_errorParams; + using JKQTPXFunctionLineGraph::set_plotFunction; + using JKQTPXFunctionLineGraph::set_params; + using JKQTPXFunctionLineGraph::set_errorPlotFunction; + using JKQTPXFunctionLineGraph::set_errorParams; /** \brief fill the data array with data from the function plotFunction */ virtual void createPlotData(bool collectParams=true) override; /** \brief implements the actual plot function */ - static double JKQTPxParsedFunctionLineGraphFunction(double x, void *data) ; + static double JKQTPXParsedFunctionLineGraphFunction(double x, void *data) ; }; @@ -129,19 +129,19 @@ class LIB_EXPORT JKQTPxParsedFunctionLineGraph: public JKQTPxFunctionLineGraph { Use the variable \c y in an equation to refer to the free parameter of the curve (\c is also understood for convenience). */ -class LIB_EXPORT JKQTPyParsedFunctionLineGraph: public JKQTPyFunctionLineGraph { +class LIB_EXPORT JKQTPYParsedFunctionLineGraph: public JKQTPYFunctionLineGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPyParsedFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + JKQTPYParsedFunctionLineGraph(JKQTBasePlotter* parent=nullptr); /** \brief class constructor */ - JKQTPyParsedFunctionLineGraph(JKQtPlotter* parent); + JKQTPYParsedFunctionLineGraph(JKQTPLotter* parent); /** \brief class destructor */ - virtual ~JKQTPyParsedFunctionLineGraph() override; + virtual ~JKQTPYParsedFunctionLineGraph() override; /*! \brief sets the property function to the specified \a __value. \details Description of the parameter function is:
\copybrief function
@@ -176,7 +176,7 @@ class LIB_EXPORT JKQTPyParsedFunctionLineGraph: public JKQTPyFunctionLineGraph { /** \brief INTERNAL data structure * \internal */ - struct JKQTPyParsedFunctionLineGraphFunctionData { + struct JKQTPYParsedFunctionLineGraphFunctionData { JKQTPMathParser* parser; JKQTPMathParser::jkmpNode* node; int varcount; @@ -185,21 +185,21 @@ class LIB_EXPORT JKQTPyParsedFunctionLineGraph: public JKQTPyFunctionLineGraph { protected: /** \brief the function to be evaluated for the plot. Use \c x as the free variable, e.g. \c "x^2+2" */ QString function; - JKQTPyParsedFunctionLineGraphFunctionData fdata; + JKQTPYParsedFunctionLineGraphFunctionData fdata; /** \brief the function to be evaluated to add error indicators to the graph. This function is evaluated to an error for every x. Use \c x as the free variable, e.g. \c "x^2+2". */ QString errorFunction; - JKQTPyParsedFunctionLineGraphFunctionData efdata; + JKQTPYParsedFunctionLineGraphFunctionData efdata; // hide functions that should not be used in this class! - using JKQTPxFunctionLineGraph::set_plotFunction; - using JKQTPxFunctionLineGraph::set_params; - using JKQTPxFunctionLineGraph::set_errorPlotFunction; - using JKQTPxFunctionLineGraph::set_errorParams; + using JKQTPXFunctionLineGraph::set_plotFunction; + using JKQTPXFunctionLineGraph::set_params; + using JKQTPXFunctionLineGraph::set_errorPlotFunction; + using JKQTPXFunctionLineGraph::set_errorParams; /** \brief fill the data array with data from the function plotFunction */ virtual void createPlotData(bool collectParams=true) override; /** \brief implements the actual plot function */ - static double JKQTPyParsedFunctionLineGraphFunction(double x, void *data); + static double JKQTPYParsedFunctionLineGraphFunction(double x, void *data); }; #endif // jkqtpgraphsparsedfunction_H diff --git a/lib/jkqtplotter/jkqtpgraphspeakstream.cpp b/lib/jkqtplotter/jkqtpgraphspeakstream.cpp index 760a7fa006..4c896e229c 100644 --- a/lib/jkqtplotter/jkqtpgraphspeakstream.cpp +++ b/lib/jkqtplotter/jkqtpgraphspeakstream.cpp @@ -32,8 +32,8 @@ -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQtBasePlotter *parent): - JKQTPsingleColumnGraph(parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQTBasePlotter *parent): + JKQTPSingleColumnGraph(parent) { baseline=0; yPeaks=true; @@ -41,8 +41,8 @@ JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQtBasePlotter *parent): drawBaseline=true; } -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQtBasePlotter *parent): - JKQTPsingleColumnGraph(dataColumn, color, Qt::SolidLine, 2.0, parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQTBasePlotter *parent): + JKQTPSingleColumnGraph(dataColumn, color, Qt::SolidLine, 2.0, parent) { yPeaks=true; this->baseline=baseline; @@ -50,8 +50,8 @@ JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, doub drawBaseline=true; } -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQtBasePlotter *parent): - JKQTPsingleColumnGraph(dataColumn, parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQTBasePlotter *parent): + JKQTPSingleColumnGraph(dataColumn, parent) { yPeaks=true; this->baseline=baseline; @@ -60,8 +60,8 @@ JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, doub } -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQtPlotter *parent): - JKQTPsingleColumnGraph(parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQTPLotter *parent): + JKQTPSingleColumnGraph(parent) { baseline=0; yPeaks=true; @@ -69,8 +69,8 @@ JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(JKQtPlotter *parent): drawBaseline=true; } -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQtPlotter *parent): - JKQTPsingleColumnGraph(dataColumn, color, Qt::SolidLine, 2.0, parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQTPLotter *parent): + JKQTPSingleColumnGraph(dataColumn, color, Qt::SolidLine, 2.0, parent) { yPeaks=true; this->baseline=baseline; @@ -78,8 +78,8 @@ JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, doub drawBaseline=true; } -JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQtPlotter *parent): - JKQTPsingleColumnGraph(dataColumn, parent) +JKQTPPeakStreamGraph::JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQTPLotter *parent): + JKQTPSingleColumnGraph(dataColumn, parent) { yPeaks=true; this->baseline=baseline; @@ -117,7 +117,7 @@ void JKQTPPeakStreamGraph::draw(JKQTPEnhancedPainter &painter) JKQTPAutoOutputTimer jkaaot("JKQTPPeakStreamGraph::draw"); #endif if (parent==nullptr) return; - JKQTPdatastore* datastore=parent->getDatastore(); + JKQTPDatastore* datastore=parent->getDatastore(); if (datastore==nullptr) return; if (dataColumn<0) return; diff --git a/lib/jkqtplotter/jkqtpgraphspeakstream.h b/lib/jkqtplotter/jkqtpgraphspeakstream.h index d54934ab26..5c21eed555 100644 --- a/lib/jkqtplotter/jkqtpgraphspeakstream.h +++ b/lib/jkqtplotter/jkqtpgraphspeakstream.h @@ -31,10 +31,10 @@ #define jkqtpgraphspeakstream_H_INCLUDED // forward declarations -class JKQtBasePlotter; -class JKQtPlotter; -class JKQTPcoordinateAxis; -class JKQTPdatastore; +class JKQTBasePlotter; +class JKQTPLotter; +class JKQTPCoordinateAxis; +class JKQTPDatastore; /*! \brief interprets data as a stream of x- or y-positions \f$ p_i \f$ (depending in \a yPeaks ) ans plots a line on the height @@ -45,16 +45,16 @@ class JKQTPdatastore; \image html JKQTPPeakStreamGraphY.png "yPeaks=true" \image html JKQTPPeakStreamGraphX.png "yPeaks=false" */ -class LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPsingleColumnGraph { +class LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPSingleColumnGraph { Q_OBJECT public: /** \brief class constructor */ - JKQTPPeakStreamGraph(JKQtBasePlotter* parent=nullptr); - JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQtBasePlotter* parent=nullptr); - JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQtBasePlotter* parent=nullptr); - JKQTPPeakStreamGraph(JKQtPlotter* parent); - JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQtPlotter* parent); - JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQtPlotter* parent); + JKQTPPeakStreamGraph(JKQTBasePlotter* parent=nullptr); + JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQTBasePlotter* parent=nullptr); + JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQTBasePlotter* parent=nullptr); + JKQTPPeakStreamGraph(JKQTPLotter* parent); + JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, QColor color, JKQTPLotter* parent); + JKQTPPeakStreamGraph(int dataColumn, double baseline, double peakHeight, JKQTPLotter* parent); /** \brief get the maximum and minimum x-value of the graph * diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index d2bab112f7..c74601c1fe 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -36,7 +36,7 @@ #include "jkqtplotter/jkqtpgraphs.h" -#define JKQTP_RESIZE_DELAY 100 +#define jkqtp_RESIZE_DELAY 100 @@ -44,23 +44,23 @@ /************************************************************************************************************************** - * JKQtPlotter + * JKQTPLotter **************************************************************************************************************************/ -JKQtPlotter::JKQtPlotter(bool datastore_internal, QWidget* parent, JKQTPdatastore* datast): +JKQTPLotter::JKQTPLotter(bool datastore_internal, QWidget* parent, JKQTPDatastore* datast): QWidget(parent, Qt::Widget) { - initJKQtPlotterResources(); + initJKQTPLotterResources(); init(datastore_internal, parent, datast); } -JKQtPlotter::JKQtPlotter(QWidget *parent): +JKQTPLotter::JKQTPLotter(QWidget *parent): QWidget(parent, Qt::Widget) { - initJKQtPlotterResources(); + initJKQTPLotterResources(); init(true, parent, nullptr); } -void JKQtPlotter::init(bool datastore_internal, QWidget* parent, JKQTPdatastore* datast) +void JKQTPLotter::init(bool datastore_internal, QWidget* parent, JKQTPDatastore* datast) { leftDoubleClickAction=LeftDoubleClickDefault; menuSpecialContextMenu=nullptr; @@ -70,7 +70,7 @@ void JKQtPlotter::init(bool datastore_internal, QWidget* parent, JKQTPdatastore* connect(&resizeTimer, SIGNAL(timeout()), this, SLOT(delayedResizeEvent())); doDrawing=false; magnification=1; - plotter=new JKQtBasePlotter(datastore_internal, this, datast); + plotter=new JKQTBasePlotter(datastore_internal, this, datast); plotter->set_emitSignals(false); plotter->set_backgroundColor(palette().color(QPalette::Window));//QPalette::Window plotter->set_def_backgroundColor(palette().color(QPalette::Window));//QPalette::Window @@ -79,12 +79,12 @@ void JKQtPlotter::init(bool datastore_internal, QWidget* parent, JKQTPdatastore* mousePosX=0; mousePosY=0; - rightMouseButtonAction=JKQtPlotter::RightMouseButtonContextMenu; + rightMouseButtonAction=JKQTPLotter::RightMouseButtonContextMenu; connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); connect(plotter, SIGNAL(beforePlotScalingRecalculate()), this, SLOT(intBeforePlotScalingRecalculate())); - connect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQtBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQtBasePlotter*))); + connect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQTBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQTBasePlotter*))); image=QImage(width(), height(), QImage::Format_ARGB32); oldImage=image; @@ -101,7 +101,7 @@ void JKQtPlotter::init(bool datastore_internal, QWidget* parent, JKQTPdatastore* customMousePositiontext=""; displayToolbar=true; toolbarAlwaysOn=false; - mouseActionMode=JKQtPlotter::ZoomRectangle; + mouseActionMode=JKQTPLotter::ZoomRectangle; //zoomByDoubleAndRightMouseClick=true; zoomByMouseWheel=true; @@ -135,15 +135,15 @@ void JKQtPlotter::init(bool datastore_internal, QWidget* parent, JKQTPdatastore* } -JKQtPlotter::~JKQtPlotter() { +JKQTPLotter::~JKQTPLotter() { disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); disconnect(plotter, SIGNAL(beforePlotScalingRecalculate()), this, SLOT(intBeforePlotScalingRecalculate())); - disconnect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQtBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQtBasePlotter*))); + disconnect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQTBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQTBasePlotter*))); delete plotter; } -void JKQtPlotter::updateToolbarActions() +void JKQTPLotter::updateToolbarActions() { toolbar->clear(); toolbar->setAutoFillBackground(true); @@ -153,27 +153,27 @@ void JKQtPlotter::updateToolbarActions() } -void JKQtPlotter::loadSettings(QSettings& settings, QString group) { +void JKQTPLotter::loadSettings(QSettings& settings, QString group) { plotter->loadSettings(settings, group); set_toolbarIconSize(settings.value(group+"toolbar_icon_size", toolbarIconSize).toInt()); mousePositionTemplate=settings.value(group+"mouse_position_template", mousePositionTemplate).toString(); - userActionColor=QColor(settings.value(group+"zoomrect_color", JKQTP_QColor2String(userActionColor)).toString()); + userActionColor=QColor(settings.value(group+"zoomrect_color", jkqtp_QColor2String(userActionColor)).toString()); update_plot(); } -void JKQtPlotter::saveSettings(QSettings& settings, QString group) { +void JKQTPLotter::saveSettings(QSettings& settings, QString group) { plotter->saveSettings(settings, group); - if (userActionColor!=def_userActionColor) settings.setValue(group+"zoomrect_color", JKQTP_QColor2String(userActionColor)); + if (userActionColor!=def_userActionColor) settings.setValue(group+"zoomrect_color", jkqtp_QColor2String(userActionColor)); if (toolbarIconSize!=def_toolbarIconSize) settings.setValue(group+"toolbar_icon_size", toolbarIconSize); if (mousePositionTemplate!=def_mousePositionTemplate) settings.setValue(group+"mouse_position_template", mousePositionTemplate); } -void JKQtPlotter::paintUserAction() { +void JKQTPLotter::paintUserAction() { if (mouseDragingRectangle) { image=oldImage; if (image.width()>0 && image.height()>0 && !image.isNull()) { @@ -192,22 +192,22 @@ void JKQtPlotter::paintUserAction() { double y2=plotter->y2p(mouseDragRectYEnd)*magnification; double dx=x2-x1; double dy=y2-y1; - if ((mouseActionMode==JKQtPlotter::ZoomRectangle) || (mouseActionMode==JKQtPlotter::RectangleEvents)) { + if ((mouseActionMode==JKQTPLotter::ZoomRectangle) || (mouseActionMode==JKQTPLotter::RectangleEvents)) { painter.setOpacity(0.2); painter.fillRect(QRectF(x1, y1, x2-x1, y2-y1), QBrush(userActionColor)); painter.setOpacity(1.0); painter.drawRect(QRectF(x1, y1, x2-x1, y2-y1)); - } else if (mouseActionMode==JKQtPlotter::CircleEvents) { + } else if (mouseActionMode==JKQTPLotter::CircleEvents) { QColor zc=userActionColor; zc.setAlphaF(0.2); painter.setBrush(QBrush(zc)); painter.drawEllipse(QPointF(x1, y1), qMin(fabs(dx), fabs(dy)), qMin(fabs(dx), fabs(dy))); - } else if (mouseActionMode==JKQtPlotter::EllipseEvents) { + } else if (mouseActionMode==JKQTPLotter::EllipseEvents) { QColor zc=userActionColor; zc.setAlphaF(0.2); painter.setBrush(QBrush(zc)); painter.drawEllipse(QPointF(x1, y1), fabs(dx), fabs(dy)); - } else if (mouseActionMode==JKQtPlotter::LineEvents) { + } else if (mouseActionMode==JKQTPLotter::LineEvents) { QPen pp=p; pp.setColor(userActionColor); painter.setPen(pp); @@ -221,7 +221,7 @@ void JKQtPlotter::paintUserAction() { } -void JKQtPlotter::mouseMoveEvent ( QMouseEvent * event ) { +void JKQTPLotter::mouseMoveEvent ( QMouseEvent * event ) { if (displayMousePosition) { mousePosX=plotter->p2x(event->x()/magnification); mousePosY=plotter->p2y((event->y()-getPlotYOffset())/magnification); @@ -238,15 +238,15 @@ void JKQtPlotter::mouseMoveEvent ( QMouseEvent * event ) { if (!displayToolbar) { toolbar->hide(); } - if (( (mouseActionMode==JKQtPlotter::ZoomRectangle) || - (mouseActionMode==JKQtPlotter::RectangleEvents) || - (mouseActionMode==JKQtPlotter::CircleEvents) || - (mouseActionMode==JKQtPlotter::EllipseEvents) || - (mouseActionMode==JKQtPlotter::ScribbleEvents) || - (mouseActionMode==JKQtPlotter::LineEvents) ) && + if (( (mouseActionMode==JKQTPLotter::ZoomRectangle) || + (mouseActionMode==JKQTPLotter::RectangleEvents) || + (mouseActionMode==JKQTPLotter::CircleEvents) || + (mouseActionMode==JKQTPLotter::EllipseEvents) || + (mouseActionMode==JKQTPLotter::ScribbleEvents) || + (mouseActionMode==JKQTPLotter::LineEvents) ) && mouseDragingRectangle && (event->buttons() & Qt::LeftButton)) { - if (mouseActionMode==JKQtPlotter::ScribbleEvents) { + if (mouseActionMode==JKQTPLotter::ScribbleEvents) { mouseDragRectXStart=mouseDragRectXEnd; mouseDragRectYStart=mouseDragRectYEnd; } @@ -255,10 +255,10 @@ void JKQtPlotter::mouseMoveEvent ( QMouseEvent * event ) { paintUserAction(); event->accept(); //std::cout<modifiers(), false, false); } } else { @@ -275,24 +275,24 @@ void JKQtPlotter::mouseMoveEvent ( QMouseEvent * event ) { -void JKQtPlotter::mousePressEvent ( QMouseEvent * event ){ +void JKQTPLotter::mousePressEvent ( QMouseEvent * event ){ if (event->button()==Qt::LeftButton) { mouseLastClickX=event->x(); mouseLastClickY=event->y(); - if ( (mouseActionMode!=JKQtPlotter::NoMouseAction)) + if ( (mouseActionMode!=JKQTPLotter::NoMouseAction)) { mouseDragRectXStart=plotter->p2x(event->x()/magnification); mouseDragRectYStart=plotter->p2y((event->y()-getPlotYOffset())/magnification); mouseDragingRectangle=true; oldImage=image; event->accept(); - if (mouseActionMode==JKQtPlotter::ScribbleEvents) emit userScribbleClick(mouseDragRectXStart, mouseDragRectYStart, event->modifiers(), true, false); - if (mouseActionMode==JKQtPlotter::ClickEvents) emit userClickFinished(mouseDragRectXStart, mouseDragRectYStart, event->modifiers()); + if (mouseActionMode==JKQTPLotter::ScribbleEvents) emit userScribbleClick(mouseDragRectXStart, mouseDragRectYStart, event->modifiers(), true, false); + if (mouseActionMode==JKQTPLotter::ClickEvents) emit userClickFinished(mouseDragRectXStart, mouseDragRectYStart, event->modifiers()); } } else if (event->button()==Qt::RightButton) { mouseLastClickX=event->x(); mouseLastClickY=event->y(); - if (rightMouseButtonAction==JKQtPlotter::RightMouseButtonZoom) { + if (rightMouseButtonAction==JKQTPLotter::RightMouseButtonZoom) { double xmin=plotter->p2x((long)round((double)plotter->get_iplotBorderLeft()-(double)plotter->get_plotWidth()/2.0)); double xmax=plotter->p2x((long)round((double)plotter->get_iplotBorderLeft()+1.5*(double)plotter->get_plotWidth())); double ymin=plotter->p2y((long)round((double)plotter->get_iplotBorderTop()+1.5*(double)plotter->get_plotHeight())); @@ -312,7 +312,7 @@ void JKQtPlotter::mousePressEvent ( QMouseEvent * event ){ plotter->setXY(xmin, xmax, ymin, ymax); //update(); event->accept(); - } else if (rightMouseButtonAction==JKQtPlotter::RightMouseButtonContextMenu) { + } else if (rightMouseButtonAction==JKQTPLotter::RightMouseButtonContextMenu) { openContextMenu(event->x(), event->y()); event->accept(); @@ -327,7 +327,7 @@ void JKQtPlotter::mousePressEvent ( QMouseEvent * event ){ } } -void JKQtPlotter::mouseReleaseEvent ( QMouseEvent * event ){ +void JKQTPLotter::mouseReleaseEvent ( QMouseEvent * event ){ if ((event->flags()&Qt::MouseEventCreatedDoubleClick)==Qt::MouseEventCreatedDoubleClick) { return; } @@ -345,7 +345,7 @@ void JKQtPlotter::mouseReleaseEvent ( QMouseEvent * event ){ double y2=mouseDragRectYEnd; if ((mouseDragRectXStart!=mouseDragRectXEnd) && (mouseDragRectYStart!=mouseDragRectYEnd)) { - if (mouseActionMode==JKQtPlotter::ZoomRectangle) { + if (mouseActionMode==JKQTPLotter::ZoomRectangle) { double xmin=mouseDragRectXStart; double xmax=mouseDragRectXEnd; @@ -354,25 +354,25 @@ void JKQtPlotter::mouseReleaseEvent ( QMouseEvent * event ){ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); plotter->setXY(xmin, xmax, ymin, ymax); - } else if (mouseActionMode==JKQtPlotter::RectangleEvents) { + } else if (mouseActionMode==JKQTPLotter::RectangleEvents) { emit userRectangleFinished(x1, y1, x2-x1, y2-y1, event->modifiers()); - } else if (mouseActionMode==JKQtPlotter::CircleEvents) { + } else if (mouseActionMode==JKQTPLotter::CircleEvents) { emit userCircleFinished(x1, y1, qMin(fabs(x2-x1), fabs(y2-y1)), event->modifiers()); - } else if (mouseActionMode==JKQtPlotter::EllipseEvents) { + } else if (mouseActionMode==JKQTPLotter::EllipseEvents) { emit userEllipseFinished(x1, y1, fabs(x2-x1), fabs(y2-y1), event->modifiers()); - } else if (mouseActionMode==JKQtPlotter::LineEvents) { + } else if (mouseActionMode==JKQTPLotter::LineEvents) { emit userLineFinished(x1, y1, x2, y2, event->modifiers()); - } else if (mouseActionMode==JKQtPlotter::ScribbleEvents) { + } else if (mouseActionMode==JKQTPLotter::ScribbleEvents) { emit userScribbleClick(x1, y1, event->modifiers(), false, true); } } - if (mouseActionMode!=JKQtPlotter::ZoomRectangle) update(); + if (mouseActionMode!=JKQTPLotter::ZoomRectangle) update(); event->accept(); } } -void JKQtPlotter::mouseDoubleClickEvent ( QMouseEvent * event ){ +void JKQTPLotter::mouseDoubleClickEvent ( QMouseEvent * event ){ // only react on double clicks inside the widget if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { @@ -389,7 +389,7 @@ void JKQtPlotter::mouseDoubleClickEvent ( QMouseEvent * event ){ } } - if (rightMouseButtonAction==JKQtPlotter::RightMouseButtonZoom && event->button()==Qt::RightButton) { + if (rightMouseButtonAction==JKQTPLotter::RightMouseButtonZoom && event->button()==Qt::RightButton) { double factor=4.0; if (event->button()==Qt::RightButton) factor=1; double xmin=plotter->p2x((long)round((double)event->x()/magnification-(double)plotter->get_plotWidth()/factor)); @@ -410,7 +410,7 @@ void JKQtPlotter::mouseDoubleClickEvent ( QMouseEvent * event ){ } else { event->ignore(); } } -void JKQtPlotter::keyReleaseEvent(QKeyEvent *event) { +void JKQTPLotter::keyReleaseEvent(QKeyEvent *event) { QWidget::keyPressEvent(event); if (event->key()==Qt::Key_Escape && event->modifiers()==Qt::NoModifier) { if (mouseDragingRectangle) { @@ -422,7 +422,7 @@ void JKQtPlotter::keyReleaseEvent(QKeyEvent *event) { } } -void JKQtPlotter::wheelEvent ( QWheelEvent * event ) { +void JKQTPLotter::wheelEvent ( QWheelEvent * event ) { // only react on wheel turns inside the widget, turning forward will zoom out and turning backwards will zoom in by a factor of 2 if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { @@ -445,7 +445,7 @@ void JKQtPlotter::wheelEvent ( QWheelEvent * event ) { } else { event->ignore(); } } -int JKQtPlotter::getPlotYOffset() { +int JKQTPLotter::getPlotYOffset() { int plotYOffset=0; if (displayMousePosition) { plotYOffset=plotYOffset+QFontMetrics(font()).height()+2; @@ -456,7 +456,7 @@ int JKQtPlotter::getPlotYOffset() { return plotYOffset; } -void JKQtPlotter::initContextMenu() +void JKQTPLotter::initContextMenu() { contextMenu->clear(); qDeleteAll(contextSubMenus); @@ -496,8 +496,8 @@ void JKQtPlotter::initContextMenu() } bool hasSep=false; - JKQtBasePlotter::AdditionalActionsMap lst=get_plotter()->get_lstAdditionalPlotterActions(); - JKQtBasePlotter::AdditionalActionsMapIterator it(lst); + JKQTBasePlotter::AdditionalActionsMap lst=get_plotter()->get_lstAdditionalPlotterActions(); + JKQTBasePlotter::AdditionalActionsMapIterator it(lst); while (it.hasNext()) { it.next(); if (it.value().size()>0) { @@ -526,39 +526,39 @@ void JKQtPlotter::initContextMenu() } -void JKQtPlotter::updateCursor() { - if (mouseActionMode==JKQtPlotter::ZoomRectangle) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_zoom.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_zoom_mask.png"); +void JKQTPLotter::updateCursor() { + if (mouseActionMode==JKQTPLotter::ZoomRectangle) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_zoom.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_zoom_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); - } else if (mouseActionMode==JKQtPlotter::RectangleEvents) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_rectangle.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_rectangle_mask.png"); + } else if (mouseActionMode==JKQTPLotter::RectangleEvents) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_rectangle.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_rectangle_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); - } else if (mouseActionMode==JKQtPlotter::CircleEvents) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_circle.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_circle_mask.png"); + } else if (mouseActionMode==JKQTPLotter::CircleEvents) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_circle.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_circle_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); - } else if (mouseActionMode==JKQtPlotter::EllipseEvents) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_ellipse.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_ellipse_mask.png"); + } else if (mouseActionMode==JKQTPLotter::EllipseEvents) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_ellipse.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_ellipse_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); - } else if (mouseActionMode==JKQtPlotter::LineEvents) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_line.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_line_mask.png"); + } else if (mouseActionMode==JKQTPLotter::LineEvents) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_line.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_line_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); - } else if (mouseActionMode==JKQtPlotter::ClickEvents) { + } else if (mouseActionMode==JKQTPLotter::ClickEvents) { setCursor(QCursor(Qt::CrossCursor)); - } else if (mouseActionMode==JKQtPlotter::ScribbleEvents) { - QBitmap cursor(":/JKQTPlotter/jkqtp_cursor_scribble.png"); - QBitmap mask(":/JKQTPlotter/jkqtp_cursor_scribble_mask.png"); + } else if (mouseActionMode==JKQTPLotter::ScribbleEvents) { + QBitmap cursor(":/JKQTPLotter/jkqtp_cursor_scribble.png"); + QBitmap mask(":/JKQTPLotter/jkqtp_cursor_scribble_mask.png"); setCursor(QCursor(cursor, mask, 9, 14)); } else { setCursor(QCursor(Qt::ArrowCursor)); } } -void JKQtPlotter::update_overlays() { +void JKQTPLotter::update_overlays() { if (!doDrawing) return; disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); @@ -574,21 +574,21 @@ void JKQtPlotter::update_overlays() { update(); } -void JKQtPlotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQtPlotter * /*sender*/) { +void JKQTPLotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQTPLotter * /*sender*/) { setX(newxmin, newxmax); } -void JKQtPlotter::synchronizeYAxis(double /*newxmin*/, double /*newxmax*/, double newymin, double newymax, JKQtPlotter * /*sender*/) { +void JKQTPLotter::synchronizeYAxis(double /*newxmin*/, double /*newxmax*/, double newymin, double newymax, JKQTPLotter * /*sender*/) { setY(newymin, newymax); } -void JKQtPlotter::synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter * /*sender*/) { +void JKQTPLotter::synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTPLotter * /*sender*/) { setXY(newxmin, newxmax, newymin, newymax); } -void JKQtPlotter::replot_overlays() { +void JKQTPLotter::replot_overlays() { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtPlotter::replot_overlays()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPLotter::replot_overlays()")); #endif if (!doDrawing) return; disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); @@ -605,9 +605,9 @@ void JKQtPlotter::replot_overlays() { repaint(); } -void JKQtPlotter::update_plot() { +void JKQTPLotter::update_plot() { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtPlotter::update_plot()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPLotter::update_plot()")); #endif if (!doDrawing) return; disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); @@ -629,9 +629,9 @@ void JKQtPlotter::update_plot() { update(); } -void JKQtPlotter::replot_plot() { +void JKQTPLotter::replot_plot() { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtPlotter::replot_plot()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPLotter::replot_plot()")); #endif if (!doDrawing) return; disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); @@ -651,9 +651,9 @@ void JKQtPlotter::replot_plot() { -void JKQtPlotter::paintEvent(QPaintEvent *event){ +void JKQTPLotter::paintEvent(QPaintEvent *event){ #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtPlotter::paintEvent()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPLotter::paintEvent()")); #endif // draw the saved image of the plot JKQTPEnhancedPainter* p = new JKQTPEnhancedPainter(this); @@ -688,9 +688,9 @@ void JKQtPlotter::paintEvent(QPaintEvent *event){ event->accept(); } -void JKQtPlotter::resizeEvent(QResizeEvent *event) { +void JKQTPLotter::resizeEvent(QResizeEvent *event) { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQtPlotter::resizeEvent()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPLotter::resizeEvent()")); #endif //qDebug()<<"resizeEvent old="<hide(); } -void JKQtPlotter::updateToolbar() +void JKQTPLotter::updateToolbar() { if (displayToolbar) { if (toolbarAlwaysOn) { @@ -751,7 +751,7 @@ void JKQtPlotter::updateToolbar() } -QSize JKQtPlotter::minimumSizeHint() const { +QSize JKQTPLotter::minimumSizeHint() const { QSize m=QWidget::minimumSizeHint(); if (minSize.width()>m.width()) m.setWidth(minSize.width()); @@ -759,13 +759,13 @@ QSize JKQtPlotter::minimumSizeHint() const { return m;//QSize((int)round((plotter->get_iplotBorderLeft()+plotter->get_iplotBorderRight())*1.5), (int)round((plotter->get_iplotBorderTop()+plotter->get_iplotBorderBottom())*1.5)); } -QSize JKQtPlotter::sizeHint() const { +QSize JKQTPLotter::sizeHint() const { return QWidget::sizeHint(); //minimumSizeHint()+QSize(200,100); } -void JKQtPlotter::masterPlotScalingRecalculated() { +void JKQTPLotter::masterPlotScalingRecalculated() { if (masterPlotter) { if (plotter->get_masterSynchronizeHeight()||plotter->get_masterSynchronizeWidth()) { update_plot(); @@ -773,7 +773,7 @@ void JKQtPlotter::masterPlotScalingRecalculated() { } } -void JKQtPlotter::synchronizeToMaster(JKQtPlotter* master, bool synchronizeWidth, bool synchronizeHeight) { +void JKQTPLotter::synchronizeToMaster(JKQTPLotter* master, bool synchronizeWidth, bool synchronizeHeight) { if (!master) { resetMasterSynchronization(); } @@ -783,22 +783,22 @@ void JKQtPlotter::synchronizeToMaster(JKQtPlotter* master, bool synchronizeWidth update_plot(); } -void JKQtPlotter::resetMasterSynchronization() { +void JKQTPLotter::resetMasterSynchronization() { if (masterPlotter) disconnect(masterPlotter->get_plotter(), SIGNAL(plotScalingRecalculated()), this, SLOT(masterPlotScalingRecalculated())); plotter->resetMasterSynchronization(); update_plot(); } -void JKQtPlotter::pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* /*sender*/) { +void JKQTPLotter::pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* /*sender*/) { emit zoomChangedLocally(newxmin, newxmax, newymin, newymax, this); minSize=QSize(plotter->get_iplotBorderLeft()+plotter->get_iplotBorderRight()+10, plotter->get_iplotBorderTop()+plotter->get_iplotBorderBottom()+10); } -void JKQtPlotter::intBeforePlotScalingRecalculate() { +void JKQTPLotter::intBeforePlotScalingRecalculate() { emit beforePlotScalingRecalculate(); } -void JKQtPlotter::reactGraphVisible(bool visible) +void JKQTPLotter::reactGraphVisible(bool visible) { QAction* act=dynamic_cast(sender()); if (act) { @@ -806,12 +806,12 @@ void JKQtPlotter::reactGraphVisible(bool visible) } } -void JKQtPlotter::set_zoomByMouseRectangle(bool zomByrectangle) { - if (zomByrectangle) mouseActionMode=JKQtPlotter::ZoomRectangle; - else mouseActionMode=JKQtPlotter::NoMouseAction; +void JKQTPLotter::set_zoomByMouseRectangle(bool zomByrectangle) { + if (zomByrectangle) mouseActionMode=JKQTPLotter::ZoomRectangle; + else mouseActionMode=JKQTPLotter::NoMouseAction; } -void JKQtPlotter::set_menuSpecialContextMenu(QMenu *menu) +void JKQTPLotter::set_menuSpecialContextMenu(QMenu *menu) { menuSpecialContextMenu=menu; if (menuSpecialContextMenu) { @@ -820,21 +820,21 @@ void JKQtPlotter::set_menuSpecialContextMenu(QMenu *menu) } } -void JKQtPlotter::setMagnification(double m) +void JKQTPLotter::setMagnification(double m) { magnification=m; update_plot(); } -bool JKQtPlotter::get_zoomByMouseRectangle() const { - return (mouseActionMode==JKQtPlotter::ZoomRectangle); +bool JKQTPLotter::get_zoomByMouseRectangle() const { + return (mouseActionMode==JKQTPLotter::ZoomRectangle); } -void JKQtPlotter::modifyContextMenu(QMenu * /*menu*/) +void JKQTPLotter::modifyContextMenu(QMenu * /*menu*/) { } -void JKQtPlotter::populateToolbar(QToolBar *toolbar) const +void JKQTPLotter::populateToolbar(QToolBar *toolbar) const { toolbar->addAction(plotter->get_actSaveData()); toolbar->addAction(plotter->get_actSavePlot()); @@ -857,18 +857,18 @@ void JKQtPlotter::populateToolbar(QToolBar *toolbar) const } -void JKQtPlotter::setMousePositionLabel(const QString &text) +void JKQTPLotter::setMousePositionLabel(const QString &text) { customMousePositiontext=text; if (displayCustomMousePosition) update(); } -void JKQtPlotter::openContextMenu() +void JKQTPLotter::openContextMenu() { openContextMenu(mouseLastClickX, mouseLastClickY); } -void JKQtPlotter::openContextMenu(int x, int y) +void JKQTPLotter::openContextMenu(int x, int y) { //qDebug()<<"openContextMenu("<p2x(x/magnification); @@ -881,12 +881,12 @@ void JKQtPlotter::openContextMenu(int x, int y) //qDebug()<<"openContextMenu("<set_emitSignals(enable); @@ -913,7 +913,7 @@ void JKQtPlotter::set_doDrawing(bool enable) } -void initJKQtPlotterResources() +void initJKQTPLotterResources() { - initJKQtBasePlotterResources(); + initJKQTBasePlotterResources(); } diff --git a/lib/jkqtplotter/jkqtplotter.h b/lib/jkqtplotter/jkqtplotter.h index 2077df3bba..4ddb08a891 100644 --- a/lib/jkqtplotter/jkqtplotter.h +++ b/lib/jkqtplotter/jkqtplotter.h @@ -53,20 +53,20 @@ #ifndef JKQTPLOTTER_H #define JKQTPLOTTER_H -/** \brief initialized Qt-ressources necessary for JKQtPlotter +/** \brief initialized Qt-ressources necessary for JKQTPLotter * \ingroup jkqtpplotterclasses */ -LIB_EXPORT void initJKQtPlotterResources(); +LIB_EXPORT void initJKQTPLotterResources(); /** \brief class to plot function graphs in linear or (semi-)logarithmic scale * \ingroup jkqtpplotterclasses * - * This class is an implementation of JKQtPlotterBase. It uses the tools from this base class + * This class is an implementation of JKQTPLotterBase. It uses the tools from this base class * to display function graphs that use the internal datastore as data source. You can add graphs - * to this component which are described by a JKQTPplotElement struct. + * to this component which are described by a JKQTPPlotElement struct. */ -class LIB_EXPORT JKQtPlotter: public QWidget { +class LIB_EXPORT JKQTPLotter: public QWidget { Q_OBJECT public: enum MouseActionModes { @@ -98,11 +98,11 @@ class LIB_EXPORT JKQtPlotter: public QWidget { /** \brief class constructor */ - explicit JKQtPlotter(bool datastore_internal, QWidget* parent=nullptr, JKQTPdatastore* datast=nullptr); - explicit JKQtPlotter(QWidget* parent=nullptr); + explicit JKQTPLotter(bool datastore_internal, QWidget* parent=nullptr, JKQTPDatastore* datast=nullptr); + explicit JKQTPLotter(QWidget* parent=nullptr); /** \brief class destructor */ - virtual ~JKQtPlotter(); + virtual ~JKQTPLotter(); /** reinitializes the toolbar, i.e. fills in QActions added to the QWidget since its creation/the last call to this function */ virtual void updateToolbarActions(); @@ -121,9 +121,9 @@ class LIB_EXPORT JKQtPlotter: public QWidget { } /** \brief returns the class internally used for plotting */ - JKQtBasePlotter* get_plotter() const { return plotter; } + JKQTBasePlotter* get_plotter() const { return plotter; } /** \brief returns the class internally used for plotting */ - const JKQtBasePlotter* get_constplotter() const { return const_cast(plotter); } + const JKQTBasePlotter* get_constplotter() const { return const_cast(plotter); } /*! \brief sets the property displayToolbar to the specified \a __value. \details Description of the parameter displayToolbar is:
\copybrief displayToolbar
@@ -268,14 +268,14 @@ class LIB_EXPORT JKQtPlotter: public QWidget { \param synchronizeWidth do you want the plot width to be synchronized? \param synchronizeHeight do you want the plot height to be synchronized? */ - void synchronizeToMaster(JKQtPlotter* master, bool synchronizeWidth, bool synchronizeHeight); + void synchronizeToMaster(JKQTPLotter* master, bool synchronizeWidth, bool synchronizeHeight); /** \brief switches any synchronization off, that has been created by synchronizeToMaster() */ void resetMasterSynchronization(); /** \brief returns a pointer to the datastore used by this object */ - inline JKQTPdatastore* getDatastore() { return plotter->getDatastore(); } + inline JKQTPDatastore* getDatastore() { return plotter->getDatastore(); } /** \brief tells the plotter object to use the given external datastore. * @@ -283,12 +283,12 @@ class LIB_EXPORT JKQtPlotter: public QWidget { * with external management. If the current datastore is already external, this method will simply replace it by the * new one. */ - inline void useExternalDatastore(JKQTPdatastore* newStore) { plotter->useExternalDatastore(newStore); } + inline void useExternalDatastore(JKQTPDatastore* newStore) { plotter->useExternalDatastore(newStore); } /** \brief tells the plotter object to use the given external datastore and treat it as an internal one (i.e. free it * when the plotter object ist destroyed. */ - inline void useAsInternalDatastore(JKQTPdatastore* newStore) { plotter->useAsInternalDatastore(newStore); } + inline void useAsInternalDatastore(JKQTPDatastore* newStore) { plotter->useAsInternalDatastore(newStore); } /** \brief tells the plotter object to use an internal datastore. A new internal datastore object is generated only if * the current datastore is not internal. @@ -384,13 +384,13 @@ class LIB_EXPORT JKQtPlotter: public QWidget { return this->mouseLastClickY; } - inline JKQTPhorizontalAxis* get_xAxis() { return plotter->get_xAxis(); } - inline JKQTPverticalAxis* get_yAxis() { return plotter->get_yAxis(); } - inline const JKQTPhorizontalAxis* get_xAxis() const { return plotter->get_xAxis(); } - inline const JKQTPverticalAxis* get_yAxis() const { return plotter->get_yAxis(); } + inline JKQTPHorizontalAxis* get_xAxis() { return plotter->get_xAxis(); } + inline JKQTPVerticalAxis* get_yAxis() { return plotter->get_yAxis(); } + inline const JKQTPHorizontalAxis* get_xAxis() const { return plotter->get_xAxis(); } + inline const JKQTPVerticalAxis* get_yAxis() const { return plotter->get_yAxis(); } /** \brief returns description of i'th graph */ - inline JKQTPplotElement* getGraph(size_t i) { return plotter->getGraph(i); } + inline JKQTPPlotElement* getGraph(size_t i) { return plotter->getGraph(i); } /** \brief returns the number of graphs */ inline size_t getGraphCount() { return plotter->getGraphCount(); } @@ -399,10 +399,10 @@ class LIB_EXPORT JKQtPlotter: public QWidget { inline void deleteGraph(size_t i, bool deletegraph=true) { plotter->deleteGraph(i, deletegraph); } /** \brief returns \c true, if the given graph is present */ - inline bool containsGraph(JKQTPplotElement* gr) { return plotter->containsGraph(gr); } + inline bool containsGraph(JKQTPPlotElement* gr) { return plotter->containsGraph(gr); } /** \brief remove the given graph, if it is contained */ - inline void deleteGraph(JKQTPplotElement* gr, bool deletegraph=true) { plotter->deleteGraph(gr, deletegraph); }; + inline void deleteGraph(JKQTPPlotElement* gr, bool deletegraph=true) { plotter->deleteGraph(gr, deletegraph); }; /** \brief remove all plots * @@ -411,17 +411,17 @@ class LIB_EXPORT JKQtPlotter: public QWidget { inline void clearGraphs(bool deleteGraphs=true) { plotter->clearGraphs(deleteGraphs); } /** \brief add a new graph, returns it's position in the graphs list */ - inline size_t addGraph(JKQTPplotElement* gr) { return plotter->addGraph(gr); } + inline size_t addGraph(JKQTPPlotElement* gr) { return plotter->addGraph(gr); } /** \brief move the given graph to the top, or add it, if it is not yet contained */ - inline size_t moveGraphTop(JKQTPplotElement* gr) { return plotter->moveGraphTop(gr); } + inline size_t moveGraphTop(JKQTPPlotElement* gr) { return plotter->moveGraphTop(gr); } /** \brief move the given graph to the top, or add it, if it is not yet contained */ - inline size_t moveGraphBottom(JKQTPplotElement* gr) { return plotter->moveGraphBottom(gr); } + inline size_t moveGraphBottom(JKQTPPlotElement* gr) { return plotter->moveGraphBottom(gr); } - /** \brief add a new graphs from a QVector, QList, std::vector ... or any standard-iterateable container with JKQTPplotElement*-items */ - template - inline void addGraphs(const TJKQTPgraphContainer& gr) { plotter->addGraphs(gr); } + /** \brief add a new graphs from a QVector, QList, std::vector ... or any standard-iterateable container with JKQTPPlotElement*-items */ + template + inline void addGraphs(const TJKQTPGraphContainer& gr) { plotter->addGraphs(gr); } /** \brief sets minimum and maximum x-value to plot */ inline void setX(double xminn, double xmaxx) { plotter->setX(xminn, xmaxx); } @@ -475,7 +475,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget { } /** \brief returns a QPen object for the i-th plot style */ - inline JKQtBasePlotter::JKQTPPen getPlotStyle(int i) const { + inline JKQTBasePlotter::JKQTPPen getPlotStyle(int i) const { return get_constplotter()->getPlotStyle(i); } @@ -568,11 +568,11 @@ class LIB_EXPORT JKQtPlotter: public QWidget { /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis */ - void synchronizeXAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter* sender); + void synchronizeXAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTPLotter* sender); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis */ - void synchronizeYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter* sender); + void synchronizeYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTPLotter* sender); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x- and y-axis to the other x- and y-axis */ - void synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter* sender); + void synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTPLotter* sender); /** \brief popuplate the given toolbar with all actions shown in a toolbar from this class ... */ @@ -602,7 +602,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget { /** \brief signal: emitted whenever the user selects a new x-y zoom range (by mouse) */ - void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQtPlotter* sender); + void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPLotter* sender); /** \brief emitted when the user draws a rectangle */ void userClickFinished(double x, double y, Qt::KeyboardModifiers modifiers); @@ -626,14 +626,14 @@ class LIB_EXPORT JKQtPlotter: public QWidget { */ virtual void modifyContextMenu(QMenu* menu); - void init(bool datastore_internal, QWidget* parent, JKQTPdatastore* datast); + void init(bool datastore_internal, QWidget* parent, JKQTPDatastore* datast); MouseActionModes mouseActionMode; bool doDrawing; - /** \brief JKQtPlotterBase used to plot */ - JKQtBasePlotter* plotter; + /** \brief JKQTPLotterBase used to plot */ + JKQTBasePlotter* plotter; /** \brief fill color of the zoom rectangle */ @@ -778,7 +778,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget { QString customMousePositiontext; /** \brief the master plotter, this plotter is connected to. */ - QPointer masterPlotter; + QPointer masterPlotter; /** \brief calculate the y-axis shift of the plot, so there is space for the potentially displayed mouse position label */ int getPlotYOffset(); @@ -809,7 +809,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget { void masterPlotScalingRecalculated(); /** \brief called whenever the zoom changes in plotter */ - void pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQtBasePlotter* sender); + void pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* sender); /** \brief emitted before the plot scaling has been recalculated */ void intBeforePlotScalingRecalculate(); diff --git a/lib/jkqtplotter/jkqtpopencvinterface.h b/lib/jkqtplotter/jkqtpopencvinterface.h index 95da810859..c807e4ed80 100644 --- a/lib/jkqtplotter/jkqtpopencvinterface.h +++ b/lib/jkqtplotter/jkqtpopencvinterface.h @@ -42,15 +42,15 @@ * * \note You need to define the Macro JKQTPLOTTER_OPENCV_INTERFACE when compiling this lib to enabled this function. */ -inline size_t JKQTPcopyCvMatToColumn(JKQTPdatastore* datastore, const cv::Mat& mat, const QString& name=QString(""), int channel=0); +inline size_t JKQTPCopyCvMatToColumn(JKQTPDatastore* datastore, const cv::Mat& mat, const QString& name=QString(""), int channel=0); //////////////////////////////////////////////////////////////////////////////////////// -namespace JKQTPdatastore_Helper { - /** \brief internal helper function for JKQTPcopyCvMatToColumn() +namespace JKQTPDatastore_Helper { + /** \brief internal helper function for JKQTPCopyCvMatToColumn() * \ingroup jkqtpopencvinterface * \internal */ template @@ -67,19 +67,19 @@ namespace JKQTPdatastore_Helper { } } -inline size_t JKQTPcopyCvMatToColumn(JKQTPdatastore* datastore, const cv::Mat& mat, const QString &name, int channel) +inline size_t JKQTPCopyCvMatToColumn(JKQTPDatastore* datastore, const cv::Mat& mat, const QString &name, int channel) { const size_t N=static_cast(mat.cols*mat.rows); double* d=static_cast(malloc(static_cast(N)*sizeof(double))); - if (CV_MAT_DEPTH(mat.type())==CV_64F) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_32F) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_32S) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_16S) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_16U) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_8S) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else if (CV_MAT_DEPTH(mat.type())==CV_8U) JKQTPdatastore_Helper::copyDataFromMat(d, mat, channel); - else throw std::runtime_error("datatype of cv::Mat not supported by JKQTPdatastore::copyImageToColumn()"); + if (CV_MAT_DEPTH(mat.type())==CV_64F) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_32F) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_32S) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_16S) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_16U) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_8S) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else if (CV_MAT_DEPTH(mat.type())==CV_8U) JKQTPDatastore_Helper::copyDataFromMat(d, mat, channel); + else throw std::runtime_error("datatype of cv::Mat not supported by JKQTPDatastore::copyImageToColumn()"); size_t itemid=datastore->addInternalItem(d, N); return datastore->addColumnForItem(itemid, 0, name); diff --git a/lib/jkqtplottergui/jkqtpcomboboxes.cpp b/lib/jkqtplottergui/jkqtpcomboboxes.cpp index e89c85181b..2702384448 100644 --- a/lib/jkqtplottergui/jkqtpcomboboxes.cpp +++ b/lib/jkqtplottergui/jkqtpcomboboxes.cpp @@ -34,8 +34,8 @@ JKQTPMathImageColorPaletteComboBox::JKQTPMathImageColorPaletteComboBox(QWidget *parent): QComboBox(parent) { - setIconSize(QSize(JKQTP_PALETTE_ICON_WIDTH,16)); - QStringList pal=JKQTPimagePlot_getPredefinedPalettes(); + setIconSize(QSize(jkqtp_PALETTE_ICON_WIDTH,16)); + QStringList pal=JKQTPImagePlot_getPredefinedPalettes(); clear(); for (int i=0; i(i), JKQTPgraphSymbols2NameString(static_cast(i))); + for (int i=0; i<=JKQTPMaxSymbolID; i++) { + addSymbol(static_cast(i), JKQTPGraphSymbols2NameString(static_cast(i))); } setCurrentIndex(0); } -JKQTPgraphSymbols JKQTPSymbolComboBox::getSymbol() const +JKQTPGraphSymbols JKQTPSymbolComboBox::getSymbol() const { - return String2JKQTPgraphSymbols(itemData(currentIndex()).toString()); + return String2JKQTPGraphSymbols(itemData(currentIndex()).toString()); } -void JKQTPSymbolComboBox::setSymbol(JKQTPgraphSymbols symbol) +void JKQTPSymbolComboBox::setSymbol(JKQTPGraphSymbols symbol) { - int i=findData(JKQTPgraphSymbols2String(symbol)); + int i=findData(JKQTPGraphSymbols2String(symbol)); if (i>=0) setCurrentIndex(i); } -void JKQTPSymbolComboBox::setCurrentSymbol(JKQTPgraphSymbols symbol) +void JKQTPSymbolComboBox::setCurrentSymbol(JKQTPGraphSymbols symbol) { setSymbol(symbol); } -void JKQTPSymbolComboBox::addSymbol(JKQTPgraphSymbols symbol, const QString &name) +void JKQTPSymbolComboBox::addSymbol(JKQTPGraphSymbols symbol, const QString &name) { QPixmap pix(12,12); pix.fill(Qt::transparent); @@ -112,9 +112,9 @@ void JKQTPSymbolComboBox::addSymbol(JKQTPgraphSymbols symbol, const QString &nam p.begin(&pix); p.setRenderHint(JKQTPEnhancedPainter::Antialiasing); p.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing); - JKQTPplotSymbol(p, 6,6,symbol,10,1,QColor("blue"), QColor("blue").lighter()); + JKQTPPlotSymbol(p, 6,6,symbol,10,1,QColor("blue"), QColor("blue").lighter()); p.end(); - addItem(QIcon(pix), name, JKQTPgraphSymbols2String(symbol)); + addItem(QIcon(pix), name, JKQTPGraphSymbols2String(symbol)); } @@ -126,28 +126,28 @@ JKQTPLinePlotStyleComboBox::JKQTPLinePlotStyleComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - defaultSymbol=JKQTPcross; + defaultSymbol=JKQTPCross; refill(); setCurrentIndex(0); } -void JKQTPLinePlotStyleComboBox::setDefaultSymbol(JKQTPgraphSymbols symbol) +void JKQTPLinePlotStyleComboBox::setDefaultSymbol(JKQTPGraphSymbols symbol) { defaultSymbol=symbol; refill(); } -void JKQTPLinePlotStyleComboBox::addUsedSymbol(JKQTPgraphSymbols symbol) +void JKQTPLinePlotStyleComboBox::addUsedSymbol(JKQTPGraphSymbols symbol) { if (!symbols.contains(symbol)) symbols.append(symbol); refill(); } -JKQTPgraphSymbols JKQTPLinePlotStyleComboBox::getSymbol() const +JKQTPGraphSymbols JKQTPLinePlotStyleComboBox::getSymbol() const { bool ok=true; int idx=itemData(currentIndex()).toInt(&ok); - if (idx==-2) return JKQTPnoSymbol; + if (idx==-2) return JKQTPNoSymbol; if (idx>=0&&ok) return symbols.value(idx, defaultSymbol); return defaultSymbol; } @@ -162,23 +162,23 @@ void JKQTPLinePlotStyleComboBox::refill() QString txt=currentText(); setUpdatesEnabled(false); clear(); - addSymbol(JKQTPnoSymbol, true, tr("line"), -2); - addSymbol(defaultSymbol, false, JKQTPgraphSymbols2NameString(defaultSymbol), -1); - addSymbol(defaultSymbol, true, JKQTPgraphSymbols2NameString(defaultSymbol)+tr("+line"), -1); + addSymbol(JKQTPNoSymbol, true, tr("line"), -2); + addSymbol(defaultSymbol, false, JKQTPGraphSymbols2NameString(defaultSymbol), -1); + addSymbol(defaultSymbol, true, JKQTPGraphSymbols2NameString(defaultSymbol)+tr("+line"), -1); for (int i=0; i=0) setCurrentIndex(idx); else setCurrentIndex(0); setUpdatesEnabled(true); } -void JKQTPLinePlotStyleComboBox::addSymbol(JKQTPgraphSymbols symbol, bool line, const QString &name, const QVariant &data) +void JKQTPLinePlotStyleComboBox::addSymbol(JKQTPGraphSymbols symbol, bool line, const QString &name, const QVariant &data) { QPixmap pix(12,12); pix.fill(Qt::transparent); @@ -186,7 +186,7 @@ void JKQTPLinePlotStyleComboBox::addSymbol(JKQTPgraphSymbols symbol, bool line, p.begin(&pix); p.setRenderHint(JKQTPEnhancedPainter::Antialiasing); p.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing); - JKQTPplotSymbol(p, 6,6,symbol,7,1,QColor("blue"), QColor("blue").lighter()); + JKQTPPlotSymbol(p, 6,6,symbol,7,1,QColor("blue"), QColor("blue").lighter()); p.setPen(QColor("blue")); if (line) p.drawLine(0,6,12,6); p.end(); @@ -195,205 +195,205 @@ void JKQTPLinePlotStyleComboBox::addSymbol(JKQTPgraphSymbols symbol, bool line, -JKQTPerrorPlotstyleComboBox::JKQTPerrorPlotstyleComboBox(QWidget *parent): +JKQTPErrorPlotstyleComboBox::JKQTPErrorPlotstyleComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addSymbol(JKQTPnoError, tr("none"), QIcon(":/JKQTPlotter/jkqtp_enone.png")); - addSymbol(JKQTPerrorLines, tr("error lines"), QIcon(":/JKQTPlotter/jkqtp_elines.png")); - addSymbol(JKQTPerrorBars, tr("error bars"), QIcon(":/JKQTPlotter/jkqtp_ebars.png")); - addSymbol(JKQTPerrorSimpleBars, tr("simple error bars"), QIcon(":/JKQTPlotter/jkqtp_esbars.png")); - addSymbol(JKQTPerrorPolygons, tr("error polygons"), QIcon(":/JKQTPlotter/jkqtp_epoly.png")); - addSymbol(JKQTPerrorBarsLines, tr("bars + lines"), QIcon(":/JKQTPlotter/jkqtp_elinesbars.png")); - addSymbol(JKQTPerrorBarsPolygons, tr("bars + polygons"), QIcon(":/JKQTPlotter/jkqtp_epolybars.png")); - addSymbol(JKQTPerrorSimpleBarsLines, tr("simple bars + lines"), QIcon(":/JKQTPlotter/jkqtp_elinessbars.png")); - addSymbol(JKQTPerrorSimpleBarsPolygons, tr("simple bars + polygons"), QIcon(":/JKQTPlotter/jkqtp_epolysbars.png")); - addSymbol(JKQTPerrorBoxes, tr("boxes"), QIcon(":/JKQTPlotter/jkqtp_eboxes.png")); - addSymbol(JKQTPerrorEllipses, tr("ellipses"), QIcon(":/JKQTPlotter/jkqtp_eellipses.png")); + addSymbol(JKQTPNoError, tr("none"), QIcon(":/JKQTPLotter/jkqtp_enone.png")); + addSymbol(JKQTPErrorLines, tr("error lines"), QIcon(":/JKQTPLotter/jkqtp_elines.png")); + addSymbol(JKQTPErrorBars, tr("error bars"), QIcon(":/JKQTPLotter/jkqtp_ebars.png")); + addSymbol(JKQTPErrorSimpleBars, tr("simple error bars"), QIcon(":/JKQTPLotter/jkqtp_esbars.png")); + addSymbol(JKQTPErrorPolygons, tr("error polygons"), QIcon(":/JKQTPLotter/jkqtp_epoly.png")); + addSymbol(JKQTPErrorBarsLines, tr("bars + lines"), QIcon(":/JKQTPLotter/jkqtp_elinesbars.png")); + addSymbol(JKQTPErrorBarsPolygons, tr("bars + polygons"), QIcon(":/JKQTPLotter/jkqtp_epolybars.png")); + addSymbol(JKQTPErrorSimpleBarsLines, tr("simple bars + lines"), QIcon(":/JKQTPLotter/jkqtp_elinessbars.png")); + addSymbol(JKQTPErrorSimpleBarsPolygons, tr("simple bars + polygons"), QIcon(":/JKQTPLotter/jkqtp_epolysbars.png")); + addSymbol(JKQTPErrorBoxes, tr("boxes"), QIcon(":/JKQTPLotter/jkqtp_eboxes.png")); + addSymbol(JKQTPErrorEllipses, tr("ellipses"), QIcon(":/JKQTPLotter/jkqtp_eellipses.png")); setCurrentIndex(2); } -JKQTPerrorPlotstyle JKQTPerrorPlotstyleComboBox::getErrorStyle() const +JKQTPErrorPlotstyle JKQTPErrorPlotstyleComboBox::getErrorStyle() const { - return String2JKQTPerrorPlotstyle(itemData(currentIndex()).toString()); + return String2JKQTPErrorPlotstyle(itemData(currentIndex()).toString()); } -void JKQTPerrorPlotstyleComboBox::setSymbol(JKQTPerrorPlotstyle symbol) +void JKQTPErrorPlotstyleComboBox::setSymbol(JKQTPErrorPlotstyle symbol) { - int i=findData(JKQTPerrorPlotstyle2String(symbol)); + int i=findData(JKQTPErrorPlotstyle2String(symbol)); if (i>=0) setCurrentIndex(i); } -void JKQTPerrorPlotstyleComboBox::setCurrentErrorStyle(JKQTPerrorPlotstyle symbol) +void JKQTPErrorPlotstyleComboBox::setCurrentErrorStyle(JKQTPErrorPlotstyle symbol) { - int i=findData(JKQTPerrorPlotstyle2String(symbol)); + int i=findData(JKQTPErrorPlotstyle2String(symbol)); if (i>=0) setCurrentIndex(i); } -void JKQTPerrorPlotstyleComboBox::addSymbol(JKQTPerrorPlotstyle symbol, const QString &name, const QIcon& icon) +void JKQTPErrorPlotstyleComboBox::addSymbol(JKQTPErrorPlotstyle symbol, const QString &name, const QIcon& icon) { - addItem(icon, name, JKQTPerrorPlotstyle2String(symbol)); + addItem(icon, name, JKQTPErrorPlotstyle2String(symbol)); } -JKQTPkeyPositionComboBox::JKQTPkeyPositionComboBox(QWidget *parent): +JKQTPKeyPositionComboBox::JKQTPKeyPositionComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addPosition(JKQTPkeyInsideTopRight, tr("inside, top-right"), QIcon(":/JKQTPlotter/jkqtp_key_itr.png")); - addPosition(JKQTPkeyInsideTopLeft, tr("inside, top-left"), QIcon(":/JKQTPlotter/jkqtp_key_itl.png")); - addPosition(JKQTPkeyInsideBottomLeft, tr("inside, bottom-left"), QIcon(":/JKQTPlotter/jkqtp_key_ibl.png")); - addPosition(JKQTPkeyInsideBottomRight, tr("inside, bottom-right"), QIcon(":/JKQTPlotter/jkqtp_key_ibr.png")); - addPosition(JKQTPkeyOutsideTopRight, tr("outside, top-right"), QIcon(":/JKQTPlotter/jkqtp_key_otr.png")); - addPosition(JKQTPkeyOutsideTopLeft, tr("outside, top-left"), QIcon(":/JKQTPlotter/jkqtp_key_otl.png")); - addPosition(JKQTPkeyOutsideLeftTop, tr("outside, left-top"), QIcon(":/JKQTPlotter/jkqtp_key_olt.png")); - addPosition(JKQTPkeyOutsideLeftBottom, tr("outside, left-bottom"), QIcon(":/JKQTPlotter/jkqtp_key_olb.png")); - addPosition(JKQTPkeyOutsideBottomRight, tr("outside, bottom-right"), QIcon(":/JKQTPlotter/jkqtp_key_obr.png")); - addPosition(JKQTPkeyOutsideBottomLeft, tr("outside, bottom-left"), QIcon(":/JKQTPlotter/jkqtp_key_obl.png")); - addPosition(JKQTPkeyOutsideRightTop, tr("outside, right-top"), QIcon(":/JKQTPlotter/jkqtp_key_ort.png")); - addPosition(JKQTPkeyOutsideRightBottom, tr("outside, right-bottom"), QIcon(":/JKQTPlotter/jkqtp_key_orb.png")); + addPosition(JKQTPKeyInsideTopRight, tr("inside, top-right"), QIcon(":/JKQTPLotter/jkqtp_key_itr.png")); + addPosition(JKQTPKeyInsideTopLeft, tr("inside, top-left"), QIcon(":/JKQTPLotter/jkqtp_key_itl.png")); + addPosition(JKQTPKeyInsideBottomLeft, tr("inside, bottom-left"), QIcon(":/JKQTPLotter/jkqtp_key_ibl.png")); + addPosition(JKQTPKeyInsideBottomRight, tr("inside, bottom-right"), QIcon(":/JKQTPLotter/jkqtp_key_ibr.png")); + addPosition(JKQTPKeyOutsideTopRight, tr("outside, top-right"), QIcon(":/JKQTPLotter/jkqtp_key_otr.png")); + addPosition(JKQTPKeyOutsideTopLeft, tr("outside, top-left"), QIcon(":/JKQTPLotter/jkqtp_key_otl.png")); + addPosition(JKQTPKeyOutsideLeftTop, tr("outside, left-top"), QIcon(":/JKQTPLotter/jkqtp_key_olt.png")); + addPosition(JKQTPKeyOutsideLeftBottom, tr("outside, left-bottom"), QIcon(":/JKQTPLotter/jkqtp_key_olb.png")); + addPosition(JKQTPKeyOutsideBottomRight, tr("outside, bottom-right"), QIcon(":/JKQTPLotter/jkqtp_key_obr.png")); + addPosition(JKQTPKeyOutsideBottomLeft, tr("outside, bottom-left"), QIcon(":/JKQTPLotter/jkqtp_key_obl.png")); + addPosition(JKQTPKeyOutsideRightTop, tr("outside, right-top"), QIcon(":/JKQTPLotter/jkqtp_key_ort.png")); + addPosition(JKQTPKeyOutsideRightBottom, tr("outside, right-bottom"), QIcon(":/JKQTPLotter/jkqtp_key_orb.png")); setCurrentIndex(0); connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(posChanged(int))); } -JKQTPkeyPosition JKQTPkeyPositionComboBox::getPosition() const +JKQTPKeyPosition JKQTPKeyPositionComboBox::getPosition() const { - return String2JKQTPkeyPosition(itemData(currentIndex()).toString()); + return String2JKQTPKeyPosition(itemData(currentIndex()).toString()); } -void JKQTPkeyPositionComboBox::setPosition(JKQTPkeyPosition position) +void JKQTPKeyPositionComboBox::setPosition(JKQTPKeyPosition position) { - int i=findData(JKQTPkeyPosition2String(position)); + int i=findData(JKQTPKeyPosition2String(position)); if (i>=0) setCurrentIndex(i); } -void JKQTPkeyPositionComboBox::addPosition(JKQTPkeyPosition position, const QString &name, const QIcon &icon) +void JKQTPKeyPositionComboBox::addPosition(JKQTPKeyPosition position, const QString &name, const QIcon &icon) { - addItem(icon, name, JKQTPkeyPosition2String(position)); + addItem(icon, name, JKQTPKeyPosition2String(position)); } -void JKQTPkeyPositionComboBox::posChanged(int index) +void JKQTPKeyPositionComboBox::posChanged(int index) { - emit currentPositionChanged(String2JKQTPkeyPosition(itemData(index).toString())); + emit currentPositionChanged(String2JKQTPKeyPosition(itemData(index).toString())); } -JKQTPkeyLayoutComboBox::JKQTPkeyLayoutComboBox(QWidget *parent): +JKQTPKeyLayoutComboBox::JKQTPKeyLayoutComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addKeyLayout(JKQTPkeyLayoutOneColumn, tr("one column")); - addKeyLayout(JKQTPkeyLayoutOneRow, tr("one row")); - addKeyLayout(JKQTPkeyLayoutMultiColumn, tr("multiple columns")); + addKeyLayout(JKQTPKeyLayoutOneColumn, tr("one column")); + addKeyLayout(JKQTPKeyLayoutOneRow, tr("one row")); + addKeyLayout(JKQTPKeyLayoutMultiColumn, tr("multiple columns")); setCurrentIndex(0); connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(currentIndexChangedP(int))); } -JKQTPkeyLayout JKQTPkeyLayoutComboBox::getKeyLayout() const +JKQTPKeyLayout JKQTPKeyLayoutComboBox::getKeyLayout() const { - return String2JKQTPkeyLayout(itemData(currentIndex()).toString()); + return String2JKQTPKeyLayout(itemData(currentIndex()).toString()); } -void JKQTPkeyLayoutComboBox::setKeyLayout(JKQTPkeyLayout position) +void JKQTPKeyLayoutComboBox::setKeyLayout(JKQTPKeyLayout position) { - int i=findData(JKQTPkeyLayout2String(position)); + int i=findData(JKQTPKeyLayout2String(position)); if (i>=0) setCurrentIndex(i); } -void JKQTPkeyLayoutComboBox::addKeyLayout(JKQTPkeyLayout position, const QString &name) +void JKQTPKeyLayoutComboBox::addKeyLayout(JKQTPKeyLayout position, const QString &name) { - addItem(name, JKQTPkeyLayout2String(position)); + addItem(name, JKQTPKeyLayout2String(position)); } -void JKQTPkeyLayoutComboBox::currentIndexChangedP(int index) +void JKQTPKeyLayoutComboBox::currentIndexChangedP(int index) { - emit currentLayoutChanged(String2JKQTPkeyLayout(itemData(index).toString())); + emit currentLayoutChanged(String2JKQTPKeyLayout(itemData(index).toString())); } -JKQTPlabelPositionComboBox::JKQTPlabelPositionComboBox(QWidget *parent): +JKQTPLabelPositionComboBox::JKQTPLabelPositionComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addPosition(JKQTPlabelCenter, tr("center")); - addPosition(JKQTPlabelMin, tr("left")); - addPosition(JKQTPlabelMax, tr("right")); + addPosition(JKQTPLabelCenter, tr("center")); + addPosition(JKQTPLabelMin, tr("left")); + addPosition(JKQTPLabelMax, tr("right")); setCurrentIndex(0); } -JKQTPlabelPosition JKQTPlabelPositionComboBox::getPosition() const +JKQTPLabelPosition JKQTPLabelPositionComboBox::getPosition() const { - return String2JKQTPlabelPosition(itemData(currentIndex()).toString()); + return String2JKQTPLabelPosition(itemData(currentIndex()).toString()); } -void JKQTPlabelPositionComboBox::setPosition(JKQTPlabelPosition position) +void JKQTPLabelPositionComboBox::setPosition(JKQTPLabelPosition position) { - int i=findData(JKQTPlabelPosition2String(position)); + int i=findData(JKQTPLabelPosition2String(position)); if (i>=0) setCurrentIndex(i); } -void JKQTPlabelPositionComboBox::addPosition(JKQTPlabelPosition position, const QString &name, const QIcon &icon) +void JKQTPLabelPositionComboBox::addPosition(JKQTPLabelPosition position, const QString &name, const QIcon &icon) { - addItem(icon, name, JKQTPlabelPosition2String(position)); + addItem(icon, name, JKQTPLabelPosition2String(position)); } -JKQTPCAlabelTypeComboBox::JKQTPCAlabelTypeComboBox(QWidget *parent): +JKQTPCALabelTypeComboBox::JKQTPCALabelTypeComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addLabelType(JKQTPCALTexponent, tr("exponent"), QIcon(":/JKQTPlotter/jkqtp_ticks_exp.png")); - addLabelType(JKQTPCALTdefault, tr("default"), QIcon(":/JKQTPlotter/jkqtp_ticks_default.png")); - addLabelType(JKQTPCALTexponentCharacter, tr("character"), QIcon(":/JKQTPlotter/jkqtp_ticks_expchar.png")); - addLabelType(JKQTPCALTtime, tr("time"), QIcon(":/JKQTPlotter/jkqtp_ticks_time.png")); - addLabelType(JKQTPCALTdate, tr("date"), QIcon(":/JKQTPlotter/jkqtp_ticks_date.png")); - addLabelType(JKQTPCALTdatetime, tr("datetime"), QIcon(":/JKQTPlotter/jkqtp_ticks_datetime.png")); + addLabelType(JKQTPCALTexponent, tr("exponent"), QIcon(":/JKQTPLotter/jkqtp_ticks_exp.png")); + addLabelType(JKQTPCALTdefault, tr("default"), QIcon(":/JKQTPLotter/jkqtp_ticks_default.png")); + addLabelType(JKQTPCALTexponentCharacter, tr("character"), QIcon(":/JKQTPLotter/jkqtp_ticks_expchar.png")); + addLabelType(JKQTPCALTtime, tr("time"), QIcon(":/JKQTPLotter/jkqtp_ticks_time.png")); + addLabelType(JKQTPCALTdate, tr("date"), QIcon(":/JKQTPLotter/jkqtp_ticks_date.png")); + addLabelType(JKQTPCALTdatetime, tr("datetime"), QIcon(":/JKQTPLotter/jkqtp_ticks_datetime.png")); setCurrentIndex(0); } -JKQTPCAlabelType JKQTPCAlabelTypeComboBox::getLabelType() const +JKQTPCALabelType JKQTPCALabelTypeComboBox::getLabelType() const { - return String2JKQTPCAlabelType(itemData(currentIndex()).toString()); + return String2JKQTPCALabelType(itemData(currentIndex()).toString()); } -void JKQTPCAlabelTypeComboBox::setLabelType(JKQTPCAlabelType position) +void JKQTPCALabelTypeComboBox::setLabelType(JKQTPCALabelType position) { - int i=findData(JKQTPCAlabelType2String(position)); + int i=findData(JKQTPCALabelType2String(position)); if (i>=0) setCurrentIndex(i); } -void JKQTPCAlabelTypeComboBox::addLabelType(JKQTPCAlabelType position, const QString &name, const QIcon& icon) +void JKQTPCALabelTypeComboBox::addLabelType(JKQTPCALabelType position, const QString &name, const QIcon& icon) { - addItem(icon, name, JKQTPCAlabelType2String(position)); + addItem(icon, name, JKQTPCALabelType2String(position)); } -JKQTPCAdrawModeComboBox::JKQTPCAdrawModeComboBox(QWidget *parent): +JKQTPCADrawModeComboBox::JKQTPCADrawModeComboBox(QWidget *parent): QComboBox(parent) { setEditable(false); - addDrawMode(JKQTPCADMcomplete, tr("complete"), QIcon(":/JKQTPlotter/jkqtp_axis_complete.png")); - addDrawMode(JKQTPCADMticksAndLabels, tr("tick+lab."), QIcon(":/JKQTPlotter/jkqtp_axis_ticksandlabels.png")); - addDrawMode(JKQTPCADMticks, tr("tick"), QIcon(":/JKQTPlotter/jkqtp_axis_ticks.png")); - addDrawMode(JKQTPCADMline, tr("line"), QIcon(":/JKQTPlotter/jkqtp_axis_line.png")); - addDrawMode(JKQTPCADMnone, tr("none"), QIcon(":/JKQTPlotter/jkqtp_axis_none.png")); + addDrawMode(JKQTPCADMcomplete, tr("complete"), QIcon(":/JKQTPLotter/jkqtp_axis_complete.png")); + addDrawMode(JKQTPCADMticksAndLabels, tr("tick+lab."), QIcon(":/JKQTPLotter/jkqtp_axis_ticksandlabels.png")); + addDrawMode(JKQTPCADMticks, tr("tick"), QIcon(":/JKQTPLotter/jkqtp_axis_ticks.png")); + addDrawMode(JKQTPCADMline, tr("line"), QIcon(":/JKQTPLotter/jkqtp_axis_line.png")); + addDrawMode(JKQTPCADMnone, tr("none"), QIcon(":/JKQTPLotter/jkqtp_axis_none.png")); setCurrentIndex(0); } -JKQTPCAdrawMode JKQTPCAdrawModeComboBox::getDrawMode() const +JKQTPCADrawMode JKQTPCADrawModeComboBox::getDrawMode() const { - return String2JKQTPCAdrawMode(itemData(currentIndex()).toString()); + return String2JKQTPCADrawMode(itemData(currentIndex()).toString()); } -void JKQTPCAdrawModeComboBox::setDrawMode(JKQTPCAdrawMode position) +void JKQTPCADrawModeComboBox::setDrawMode(JKQTPCADrawMode position) { - int i=findData(JKQTPCAdrawMode2String(position)); + int i=findData(JKQTPCADrawMode2String(position)); if (i>=0) setCurrentIndex(i); } -void JKQTPCAdrawModeComboBox::addDrawMode(JKQTPCAdrawMode position, const QString &name, const QIcon &icon) +void JKQTPCADrawModeComboBox::addDrawMode(JKQTPCADrawMode position, const QString &name, const QIcon &icon) { - addItem(icon, name, JKQTPCAdrawMode2String(position)); + addItem(icon, name, JKQTPCADrawMode2String(position)); } @@ -403,20 +403,20 @@ JKQTPLinePlotStyleWithSymbolSizeComboBox::JKQTPLinePlotStyleWithSymbolSizeComboB QComboBox(parent) { setEditable(false); - defaultSymbol=JKQTPcross; + defaultSymbol=JKQTPCross; defaultSize=10; refill(); setCurrentIndex(0); } -void JKQTPLinePlotStyleWithSymbolSizeComboBox::setDefaultSymbol(JKQTPgraphSymbols symbol, double size) +void JKQTPLinePlotStyleWithSymbolSizeComboBox::setDefaultSymbol(JKQTPGraphSymbols symbol, double size) { defaultSymbol=symbol; defaultSize=size; refill(); } -void JKQTPLinePlotStyleWithSymbolSizeComboBox::addUsedSymbol(JKQTPgraphSymbols symbol, double symbolSize, bool line) +void JKQTPLinePlotStyleWithSymbolSizeComboBox::addUsedSymbol(JKQTPGraphSymbols symbol, double symbolSize, bool line) { styleData d; d.symbol=symbol; @@ -426,18 +426,18 @@ void JKQTPLinePlotStyleWithSymbolSizeComboBox::addUsedSymbol(JKQTPgraphSymbols s refill(); } -JKQTPgraphSymbols JKQTPLinePlotStyleWithSymbolSizeComboBox::getSymbol() const +JKQTPGraphSymbols JKQTPLinePlotStyleWithSymbolSizeComboBox::getSymbol() const { QVariant idxV=itemData(currentIndex()); bool ok=false; int idx=idxV.toInt(&ok); if (idxV.isValid() && ok) { if (idx>=0 && idx=0) setCurrentIndex(idx); else setCurrentIndex(0); setUpdatesEnabled(true); } -void JKQTPLinePlotStyleWithSymbolSizeComboBox::addSymbol(JKQTPgraphSymbols symbol, bool line, double symbolSize, const QString &name, const QVariant &data) +void JKQTPLinePlotStyleWithSymbolSizeComboBox::addSymbol(JKQTPGraphSymbols symbol, bool line, double symbolSize, const QString &name, const QVariant &data) { int pixSize=qMax(16.0, 1.2*symbolSize); QPixmap pix(pixSize, pixSize); @@ -495,7 +495,7 @@ void JKQTPLinePlotStyleWithSymbolSizeComboBox::addSymbol(JKQTPgraphSymbols symbo p.begin(&pix); p.setRenderHint(JKQTPEnhancedPainter::Antialiasing); p.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing); - JKQTPplotSymbol(p, double(pixSize)/2.0,double(pixSize)/2.0,symbol,symbolSize,1,QColor("blue"), QColor("blue").lighter()); + JKQTPPlotSymbol(p, double(pixSize)/2.0,double(pixSize)/2.0,symbol,symbolSize,1,QColor("blue"), QColor("blue").lighter()); p.setPen(QColor("blue")); if (line) p.drawLine(QLineF(0,double(pixSize)/2.0,pixSize,double(pixSize)/2.0)); p.end(); @@ -509,36 +509,36 @@ bool JKQTPLinePlotStyleWithSymbolSizeComboBox::styleData::operator==(const JKQTP } -JKQTPstepTypeComboBox::JKQTPstepTypeComboBox(QWidget *parent): +JKQTPStepTypeComboBox::JKQTPStepTypeComboBox(QWidget *parent): QComboBox(parent) { clear(); setEditable(false); - addStep(JKQTPstepType::JKQTPstepLeft, JKQTPstepType2String(JKQTPstepType::JKQTPstepLeft)); - addStep(JKQTPstepType::JKQTPstepCenter, JKQTPstepType2String(JKQTPstepType::JKQTPstepCenter)); - addStep(JKQTPstepType::JKQTPstepRight, JKQTPstepType2String(JKQTPstepType::JKQTPstepRight)); + addStep(JKQTPStepType::JKQTPStepLeft, JKQTPStepType2String(JKQTPStepType::JKQTPStepLeft)); + addStep(JKQTPStepType::JKQTPStepCenter, JKQTPStepType2String(JKQTPStepType::JKQTPStepCenter)); + addStep(JKQTPStepType::JKQTPStepRight, JKQTPStepType2String(JKQTPStepType::JKQTPStepRight)); setCurrentIndex(0); } -JKQTPstepType JKQTPstepTypeComboBox::getStepType() const +JKQTPStepType JKQTPStepTypeComboBox::getStepType() const { - return String2JKQTPstepType(itemData(currentIndex()).toString()); + return String2JKQTPStepType(itemData(currentIndex()).toString()); } -void JKQTPstepTypeComboBox::setStepType(JKQTPstepType step) +void JKQTPStepTypeComboBox::setStepType(JKQTPStepType step) { - int i=findData(JKQTPstepType2String(step)); + int i=findData(JKQTPStepType2String(step)); if (i>=0) setCurrentIndex(i); } -void JKQTPstepTypeComboBox::setCurrentStepType(JKQTPstepType step) +void JKQTPStepTypeComboBox::setCurrentStepType(JKQTPStepType step) { setStepType(step); } -void JKQTPstepTypeComboBox::addStep(JKQTPstepType step, const QString &name, const QIcon &icon) +void JKQTPStepTypeComboBox::addStep(JKQTPStepType step, const QString &name, const QIcon &icon) { - addItem(icon, name, JKQTPstepType2String(step)); + addItem(icon, name, JKQTPStepType2String(step)); } diff --git a/lib/jkqtplottergui/jkqtpcomboboxes.h b/lib/jkqtplottergui/jkqtpcomboboxes.h index ad86e7bb54..21eb99935a 100644 --- a/lib/jkqtplottergui/jkqtpcomboboxes.h +++ b/lib/jkqtplottergui/jkqtpcomboboxes.h @@ -58,114 +58,114 @@ class LIB_EXPORT JKQTPMathImageColorPaletteComboBox: public QComboBox { -/*! \brief a QComboBox which shows JKQTPCAdrawMode +/*! \brief a QComboBox which shows JKQTPCADrawMode \ingroup jkqtpcomboboxes */ -class LIB_EXPORT JKQTPCAdrawModeComboBox: public QComboBox { +class LIB_EXPORT JKQTPCADrawModeComboBox: public QComboBox { Q_OBJECT public: - JKQTPCAdrawModeComboBox(QWidget* parent=nullptr); + JKQTPCADrawModeComboBox(QWidget* parent=nullptr); - JKQTPCAdrawMode getDrawMode() const; - void setDrawMode(JKQTPCAdrawMode position); + JKQTPCADrawMode getDrawMode() const; + void setDrawMode(JKQTPCADrawMode position); protected: - void addDrawMode(JKQTPCAdrawMode position, const QString& name, const QIcon& icon=QIcon()); + void addDrawMode(JKQTPCADrawMode position, const QString& name, const QIcon& icon=QIcon()); }; -/*! \brief a QComboBox which shows JKQTPCAlabelType +/*! \brief a QComboBox which shows JKQTPCALabelType \ingroup jkqtpcomboboxes */ -class LIB_EXPORT JKQTPCAlabelTypeComboBox: public QComboBox { +class LIB_EXPORT JKQTPCALabelTypeComboBox: public QComboBox { Q_OBJECT public: - JKQTPCAlabelTypeComboBox(QWidget* parent=nullptr); + JKQTPCALabelTypeComboBox(QWidget* parent=nullptr); - JKQTPCAlabelType getLabelType() const; - void setLabelType(JKQTPCAlabelType position); + JKQTPCALabelType getLabelType() const; + void setLabelType(JKQTPCALabelType position); protected: - void addLabelType(JKQTPCAlabelType position, const QString& name, const QIcon& icon=QIcon()); + void addLabelType(JKQTPCALabelType position, const QString& name, const QIcon& icon=QIcon()); }; -/*! \brief a QComboBox which shows JKQTPlabelPosition +/*! \brief a QComboBox which shows JKQTPLabelPosition \ingroup jkqtpcomboboxes */ -class LIB_EXPORT JKQTPlabelPositionComboBox: public QComboBox { +class LIB_EXPORT JKQTPLabelPositionComboBox: public QComboBox { Q_OBJECT public: - JKQTPlabelPositionComboBox(QWidget* parent=nullptr); + JKQTPLabelPositionComboBox(QWidget* parent=nullptr); - JKQTPlabelPosition getPosition() const; - void setPosition(JKQTPlabelPosition position); + JKQTPLabelPosition getPosition() const; + void setPosition(JKQTPLabelPosition position); protected: - void addPosition(JKQTPlabelPosition position, const QString& name, const QIcon& icon=QIcon()); + void addPosition(JKQTPLabelPosition position, const QString& name, const QIcon& icon=QIcon()); }; -/*! \brief a QComboBox which shows JKQTPkeyPosition +/*! \brief a QComboBox which shows JKQTPKeyPosition \ingroup jkqtpcomboboxes - \image html JKQTPkeyPositionComboBox.png + \image html JKQTPKeyPositionComboBox.png */ -class LIB_EXPORT JKQTPkeyPositionComboBox: public QComboBox { +class LIB_EXPORT JKQTPKeyPositionComboBox: public QComboBox { Q_OBJECT public: - JKQTPkeyPositionComboBox(QWidget* parent=nullptr); + JKQTPKeyPositionComboBox(QWidget* parent=nullptr); - JKQTPkeyPosition getPosition() const; - void setPosition(JKQTPkeyPosition position); + JKQTPKeyPosition getPosition() const; + void setPosition(JKQTPKeyPosition position); signals: - void currentPositionChanged(JKQTPkeyPosition pos); + void currentPositionChanged(JKQTPKeyPosition pos); protected: - void addPosition(JKQTPkeyPosition position, const QString& name, const QIcon& icon=QIcon()); + void addPosition(JKQTPKeyPosition position, const QString& name, const QIcon& icon=QIcon()); protected slots: void posChanged(int index); }; -/*! \brief a QComboBox which shows JKQTPkeyPosition +/*! \brief a QComboBox which shows JKQTPKeyPosition \ingroup jkqtpcomboboxes */ -class LIB_EXPORT JKQTPkeyLayoutComboBox: public QComboBox { +class LIB_EXPORT JKQTPKeyLayoutComboBox: public QComboBox { Q_OBJECT public: - JKQTPkeyLayoutComboBox(QWidget* parent=nullptr); + JKQTPKeyLayoutComboBox(QWidget* parent=nullptr); - JKQTPkeyLayout getKeyLayout() const; - void setKeyLayout(JKQTPkeyLayout layout); + JKQTPKeyLayout getKeyLayout() const; + void setKeyLayout(JKQTPKeyLayout layout); signals: - void currentLayoutChanged(JKQTPkeyLayout layout); + void currentLayoutChanged(JKQTPKeyLayout layout); protected: - void addKeyLayout(JKQTPkeyLayout layout, const QString& name); + void addKeyLayout(JKQTPKeyLayout layout, const QString& name); protected slots: void currentIndexChangedP(int index); }; -/*! \brief a QComboBox which shows JKQTPerrorPlotstyle +/*! \brief a QComboBox which shows JKQTPErrorPlotstyle \ingroup jkqtpcomboboxes - \image html JKQTPerrorPlotstyleComboBox.png + \image html JKQTPErrorPlotstyleComboBox.png */ -class LIB_EXPORT JKQTPerrorPlotstyleComboBox: public QComboBox { +class LIB_EXPORT JKQTPErrorPlotstyleComboBox: public QComboBox { Q_OBJECT public: - JKQTPerrorPlotstyleComboBox(QWidget* parent=nullptr); + JKQTPErrorPlotstyleComboBox(QWidget* parent=nullptr); - JKQTPerrorPlotstyle getErrorStyle() const; - void setSymbol(JKQTPerrorPlotstyle symbol); - void setCurrentErrorStyle(JKQTPerrorPlotstyle symbol); + JKQTPErrorPlotstyle getErrorStyle() const; + void setSymbol(JKQTPErrorPlotstyle symbol); + void setCurrentErrorStyle(JKQTPErrorPlotstyle symbol); protected: - void addSymbol(JKQTPerrorPlotstyle symbol, const QString& name, const QIcon &icon=QIcon()); + void addSymbol(JKQTPErrorPlotstyle symbol, const QString& name, const QIcon &icon=QIcon()); }; -/*! \brief a QComboBox which shows JKQTPgraphSymbols +/*! \brief a QComboBox which shows JKQTPGraphSymbols \ingroup jkqtpcomboboxes \image html JKQTPSymbolComboBox.png @@ -175,11 +175,11 @@ class LIB_EXPORT JKQTPSymbolComboBox: public QComboBox { public: JKQTPSymbolComboBox(QWidget* parent=nullptr); - JKQTPgraphSymbols getSymbol() const; - void setSymbol(JKQTPgraphSymbols symbol); - void setCurrentSymbol(JKQTPgraphSymbols symbol); + JKQTPGraphSymbols getSymbol() const; + void setSymbol(JKQTPGraphSymbols symbol); + void setCurrentSymbol(JKQTPGraphSymbols symbol); protected: - void addSymbol(JKQTPgraphSymbols symbol, const QString& name); + void addSymbol(JKQTPGraphSymbols symbol, const QString& name); }; @@ -191,16 +191,16 @@ class LIB_EXPORT JKQTPLinePlotStyleComboBox: public QComboBox { public: JKQTPLinePlotStyleComboBox(QWidget* parent=nullptr); - void setDefaultSymbol(JKQTPgraphSymbols symbol); - void addUsedSymbol(JKQTPgraphSymbols symbol); + void setDefaultSymbol(JKQTPGraphSymbols symbol); + void addUsedSymbol(JKQTPGraphSymbols symbol); - JKQTPgraphSymbols getSymbol() const; + JKQTPGraphSymbols getSymbol() const; bool getDrawLine() const; protected: void refill(); - void addSymbol(JKQTPgraphSymbols symbol, bool line, const QString& name=QString(""), const QVariant& data=QVariant()); - QList symbols; - JKQTPgraphSymbols defaultSymbol; + void addSymbol(JKQTPGraphSymbols symbol, bool line, const QString& name=QString(""), const QVariant& data=QVariant()); + QList symbols; + JKQTPGraphSymbols defaultSymbol; }; @@ -212,41 +212,41 @@ class LIB_EXPORT JKQTPLinePlotStyleWithSymbolSizeComboBox: public QComboBox { public: JKQTPLinePlotStyleWithSymbolSizeComboBox(QWidget* parent=nullptr); - void setDefaultSymbol(JKQTPgraphSymbols symbol, double size); - void addUsedSymbol(JKQTPgraphSymbols symbol, double symbolSize, bool line); + void setDefaultSymbol(JKQTPGraphSymbols symbol, double size); + void addUsedSymbol(JKQTPGraphSymbols symbol, double symbolSize, bool line); - JKQTPgraphSymbols getSymbol() const; + JKQTPGraphSymbols getSymbol() const; bool getDrawLine() const; double getSymbolSize() const; protected: void refill(); - void addSymbol(JKQTPgraphSymbols symbol, bool line, double symbolSize, const QString& name=QString(""), const QVariant& data=QVariant()); + void addSymbol(JKQTPGraphSymbols symbol, bool line, double symbolSize, const QString& name=QString(""), const QVariant& data=QVariant()); struct styleData { - JKQTPgraphSymbols symbol; + JKQTPGraphSymbols symbol; bool line; double symbolSize; bool operator==(const styleData& other)const; }; QList symbols; - JKQTPgraphSymbols defaultSymbol; + JKQTPGraphSymbols defaultSymbol; double defaultSize; }; -/*! \brief a QComboBox which shows JKQTPstepType +/*! \brief a QComboBox which shows JKQTPStepType \ingroup jkqtpcomboboxes */ -class LIB_EXPORT JKQTPstepTypeComboBox: public QComboBox { +class LIB_EXPORT JKQTPStepTypeComboBox: public QComboBox { Q_OBJECT public: - JKQTPstepTypeComboBox(QWidget* parent=nullptr); + JKQTPStepTypeComboBox(QWidget* parent=nullptr); - JKQTPstepType getStepType() const; - void setStepType(JKQTPstepType step); - void setCurrentStepType(JKQTPstepType step); + JKQTPStepType getStepType() const; + void setStepType(JKQTPStepType step); + void setCurrentStepType(JKQTPStepType step); protected: - void addStep(JKQTPstepType step, const QString& name, const QIcon &icon=QIcon()); + void addStep(JKQTPStepType step, const QString& name, const QIcon &icon=QIcon()); }; diff --git a/lib/jkqtplottergui/jkqtpenhancedtableview.cpp b/lib/jkqtplottergui/jkqtpenhancedtableview.cpp index 360ebcd705..4b07b3c47b 100644 --- a/lib/jkqtplottergui/jkqtpenhancedtableview.cpp +++ b/lib/jkqtplottergui/jkqtpenhancedtableview.cpp @@ -50,19 +50,19 @@ JKQTPEnhancedTableView::JKQTPEnhancedTableView(QWidget *parent): setContextMenuPolicy(Qt::ActionsContextMenu); QAction* act; - act=new QAction(QIcon(":/JKQTPlotter/jkqtp_copy16.png"), tr("Copy Selection to Clipboard (for Excel ...)"), this); + act=new QAction(QIcon(":/JKQTPLotter/jkqtp_copy16.png"), tr("Copy Selection to Clipboard (for Excel ...)"), this); connect(act, SIGNAL(triggered()), this, SLOT(copySelectionToExcel())); addAction(act); - act=new QAction(QIcon(":/JKQTPlotter/jkqtp_copy16_nohead.png"), tr("Copy Selection to clipboard (for Excel ...) without header row/column"), this); + act=new QAction(QIcon(":/JKQTPLotter/jkqtp_copy16_nohead.png"), tr("Copy Selection to clipboard (for Excel ...) without header row/column"), this); connect(act, SIGNAL(triggered()), this, SLOT(copySelectionToExcelNoHead())); addAction(act); - act=new QAction(QIcon(":/JKQTPlotter/jkqtp_copy16.png"), tr("Copy Selection to Clipboard (as CSV)"), this); + act=new QAction(QIcon(":/JKQTPLotter/jkqtp_copy16.png"), tr("Copy Selection to Clipboard (as CSV)"), this); connect(act, SIGNAL(triggered()), this, SLOT(copySelectionToCSV())); addAction(act); - act=new QAction(QIcon(":/JKQTPlotter/jkqtp_copy16_nohead.png"), tr("Copy Selection to clipboard (as CSV ...) without header row/column"), this); + act=new QAction(QIcon(":/JKQTPLotter/jkqtp_copy16_nohead.png"), tr("Copy Selection to clipboard (as CSV ...) without header row/column"), this); connect(act, SIGNAL(triggered()), this, SLOT(copySelectionToCSVNoHead())); addAction(act); - act=new QAction(QIcon(":/JKQTPlotter/jkqtp_printtable.png"), tr("Print Table"), this); + act=new QAction(QIcon(":/JKQTPLotter/jkqtp_printtable.png"), tr("Print Table"), this); connect(act, SIGNAL(triggered()), this, SLOT(print())); addAction(act); printAction=act; diff --git a/lib/jkqtplottergui/jkqtpgraphsmodel.cpp b/lib/jkqtplottergui/jkqtpgraphsmodel.cpp index c7d56c4633..48826948ea 100644 --- a/lib/jkqtplottergui/jkqtpgraphsmodel.cpp +++ b/lib/jkqtplottergui/jkqtpgraphsmodel.cpp @@ -31,23 +31,23 @@ -JKQTPgraphsModel::JKQTPgraphsModel(JKQtBasePlotter *parent): +JKQTPGraphsModel::JKQTPGraphsModel(JKQTBasePlotter *parent): QAbstractTableModel(parent), m_plotter(parent) { } -int JKQTPgraphsModel::rowCount(const QModelIndex &/*parent*/) const +int JKQTPGraphsModel::rowCount(const QModelIndex &/*parent*/) const { return static_cast(m_plotter->getGraphCount()); } -int JKQTPgraphsModel::columnCount(const QModelIndex &/*parent*/) const +int JKQTPGraphsModel::columnCount(const QModelIndex &/*parent*/) const { return 1; } -QVariant JKQTPgraphsModel::data(const QModelIndex &index, int role) const +QVariant JKQTPGraphsModel::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { if (index.row()(m_plotter->getGraphCount())) return m_plotter->getGraph(static_cast(index.row()))->get_title(); @@ -61,7 +61,7 @@ QVariant JKQTPgraphsModel::data(const QModelIndex &index, int role) const return QVariant(); } -bool JKQTPgraphsModel::setData(const QModelIndex &index, const QVariant &value, int role) +bool JKQTPGraphsModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (role == Qt::CheckStateRole) { if (index.row()(m_plotter->getGraphCount())) { @@ -72,12 +72,12 @@ bool JKQTPgraphsModel::setData(const QModelIndex &index, const QVariant &value, return false; } -Qt::ItemFlags JKQTPgraphsModel::flags(const QModelIndex &index) const +Qt::ItemFlags JKQTPGraphsModel::flags(const QModelIndex &index) const { return Qt::ItemIsUserCheckable | QAbstractTableModel::flags(index); } -void JKQTPgraphsModel::plotUpdated() +void JKQTPGraphsModel::plotUpdated() { beginResetModel(); endResetModel(); diff --git a/lib/jkqtplottergui/jkqtpgraphsmodel.h b/lib/jkqtplottergui/jkqtpgraphsmodel.h index f0bd33ced1..80f7943967 100644 --- a/lib/jkqtplottergui/jkqtpgraphsmodel.h +++ b/lib/jkqtplottergui/jkqtpgraphsmodel.h @@ -31,17 +31,17 @@ #include -class JKQtBasePlotter; // forward -/** \brief data model with all plots ina JKQtBasePlotter (+ allows to switch them visible/invisible) +class JKQTBasePlotter; // forward +/** \brief data model with all plots ina JKQTBasePlotter (+ allows to switch them visible/invisible) * \ingroup jkqtpgraphsmodel * - * \image html JKQTPgraphsModel.png + * \image html JKQTPGraphsModel.png */ -class JKQTPgraphsModel : public QAbstractTableModel +class JKQTPGraphsModel : public QAbstractTableModel { Q_OBJECT public: - JKQTPgraphsModel(JKQtBasePlotter *parent); + JKQTPGraphsModel(JKQTBasePlotter *parent); int rowCount(const QModelIndex &parent = QModelIndex()) const override ; int columnCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @@ -50,7 +50,7 @@ public: public slots: void plotUpdated(); private: - JKQtBasePlotter* m_plotter; + JKQTBasePlotter* m_plotter; }; diff --git a/lib/jkqtplotterressources/jkqtpbaseplotter.qrc b/lib/jkqtplotterressources/jkqtpbaseplotter.qrc index e2d0e7b88a..8d0125d264 100644 --- a/lib/jkqtplotterressources/jkqtpbaseplotter.qrc +++ b/lib/jkqtplotterressources/jkqtpbaseplotter.qrc @@ -1,5 +1,5 @@ - + images/jkqtp_savedata.png images/jkqtp_saveplot.png images/jkqtp_24_print.png diff --git a/lib/jkqtplotterressources/math_fonts/xits.qrc b/lib/jkqtplotterressources/math_fonts/xits.qrc index 21df219e64..f2c409df07 100644 --- a/lib/jkqtplotterressources/math_fonts/xits.qrc +++ b/lib/jkqtplotterressources/math_fonts/xits.qrc @@ -1,5 +1,5 @@ - + xits/XITS-Bold.otf xits/XITS-BoldItalic.otf xits/XITS-Italic.otf diff --git a/lib/jkqtplottertools/jkqtp_imexport.h b/lib/jkqtplottertools/jkqtp_imexport.h index 6d883c7847..dffb58a804 100644 --- a/lib/jkqtplottertools/jkqtp_imexport.h +++ b/lib/jkqtplottertools/jkqtp_imexport.h @@ -1,5 +1,5 @@ -#ifndef JKQTP_IMPORT_H -#define JKQTP_IMPORT_H +#ifndef jkqtp_IMPORT_H +#define jkqtp_IMPORT_H /* @@ -72,5 +72,5 @@ -#endif // JKQTP_IMPORT_H +#endif // jkqtp_IMPORT_H diff --git a/lib/jkqtplottertools/jkqtpdrawingtools.cpp b/lib/jkqtplottertools/jkqtpdrawingtools.cpp index 1336c65bd0..ba3e631957 100644 --- a/lib/jkqtplottertools/jkqtpdrawingtools.cpp +++ b/lib/jkqtplottertools/jkqtpdrawingtools.cpp @@ -32,12 +32,12 @@ Copyright (c) 2008-2018 Jan W. Krieger () -void JKQTPplotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPgraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor) { +void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor) { JKQTPEnhancedPainter p(&paintDevice); - JKQTPplotSymbol(p, x, y, symbol, size, symbolLineWidth, color, fillColor); + JKQTPPlotSymbol(p, x, y, symbol, size, symbolLineWidth, color, fillColor); } -void JKQTPplotSymbol(JKQTPEnhancedPainter& painter, double x, double y, JKQTPgraphSymbols symbol, double symbolSize, double symbolLineWidth, QColor color, QColor fillColor) { +void JKQTPPlotSymbol(JKQTPEnhancedPainter& painter, double x, double y, JKQTPGraphSymbols symbol, double symbolSize, double symbolLineWidth, QColor color, QColor fillColor) { painter.save(); QPen p=painter.pen(); p.setColor(color); @@ -68,10 +68,10 @@ void JKQTPplotSymbol(JKQTPEnhancedPainter& painter, double x, double y, JKQTPgra } switch(symbol) { - case JKQTPdot: + case JKQTPDot: painter.drawPoint(QPointF(x,y)); break; - case JKQTPcross:{ + case JKQTPCross:{ /*QVector lines; lines< lines; lines< lines; lines< lines; QPainterPath path; for (int i=0; i JKQTPdrawEllipse(double x, double y, double a, double b, double angle_start, double angle_end, double alpha, int controlPoints, QPointF* x_start, QPointF* x_end) { +QVector JKQTPDrawEllipse(double x, double y, double a, double b, double angle_start, double angle_end, double alpha, int controlPoints, QPointF* x_start, QPointF* x_end) { QVector result; double start=angle_start*M_PI/180.0; double stop=angle_end*M_PI/180.0; diff --git a/lib/jkqtplottertools/jkqtpdrawingtools.h b/lib/jkqtplottertools/jkqtpdrawingtools.h index 6d73cabb71..39e231e17f 100644 --- a/lib/jkqtplottertools/jkqtpdrawingtools.h +++ b/lib/jkqtplottertools/jkqtpdrawingtools.h @@ -37,13 +37,13 @@ class JKQTPEnhancedPainter; // forward \param painter the QPainter to draw to \param x x-coordinate of the symbol center \param y y-coordinate of the symbol center - \param symbol type of the symbol to plot, see JKQTPgraphSymbols + \param symbol type of the symbol to plot, see JKQTPGraphSymbols \param size size (width/height) of the symbol around (\a x , \a y) \param symbolLineWidth width of the lines used to draw the symbol \param color color of the symbol lines \param fillColor color of the symbol filling */ -LIB_EXPORT void JKQTPplotSymbol(JKQTPEnhancedPainter& painter, double x, double y, JKQTPgraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); +LIB_EXPORT void JKQTPPlotSymbol(JKQTPEnhancedPainter& painter, double x, double y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); /*! \brief plot the specified symbol at pixel position x,y \ingroup jkqtptools_drawing @@ -51,13 +51,13 @@ LIB_EXPORT void JKQTPplotSymbol(JKQTPEnhancedPainter& painter, double x, double \param paintDevice the paint device to draw on \param x x-coordinate of the symbol center \param y y-coordinate of the symbol center - \param symbol type of the symbol to plot, see JKQTPgraphSymbols + \param symbol type of the symbol to plot, see JKQTPGraphSymbols \param size size (width/height) of the symbol around (\a x , \a y) \param symbolLineWidth width of the lines used to draw the symbol \param color color of the symbol lines \param fillColor color of the symbol filling */ -LIB_EXPORT void JKQTPplotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPgraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); +LIB_EXPORT void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); /*! \brief plot an arrow between positions (x1,y1) and (x2,y2) @@ -68,13 +68,13 @@ LIB_EXPORT void JKQTPplotSymbol(QPaintDevice& paintDevice, double x, double y, J \param y1 first y-coordinate of the arrow \param x2 second x-coordinate of the arrow \param y2 second y-coordinate of the arrow - \param symbol type of the symbol to plot, see JKQTPgraphSymbols + \param symbol type of the symbol to plot, see JKQTPGraphSymbols \param size size (width/height) of the symbol around (\a x , \a y) \param symbolLineWidth width of the lines used to draw the symbol \param color color of the symbol lines \param fillColor color of the symbol filling */ -//LIB_EXPORT void JKQTPplotArrow(JKQTPEnhancedPainter& painter, int x, int y, JKQTPgraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); +//LIB_EXPORT void JKQTPPlotArrow(JKQTPEnhancedPainter& painter, int x, int y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); /*! \brief draw an ellipse without setting pen or brush, or saving the painter! @@ -94,7 +94,7 @@ LIB_EXPORT void JKQTPplotSymbol(QPaintDevice& paintDevice, double x, double y, J \note all angles are given in degrees [0..360] */ -LIB_EXPORT QVector JKQTPdrawEllipse(double x, double y, double a, double b, double angle_start=0, double angle_end=360, double alpha=0, int controlPoints=180, QPointF* x_start=nullptr, QPointF* x_end=nullptr); +LIB_EXPORT QVector JKQTPDrawEllipse(double x, double y, double a, double b, double angle_start=0, double angle_end=360, double alpha=0, int controlPoints=180, QPointF* x_start=nullptr, QPointF* x_end=nullptr); #endif // JKQTPDRAWINGTOOLS_H_INCLUDED diff --git a/lib/jkqtplottertools/jkqtpimagetools.cpp b/lib/jkqtplottertools/jkqtpimagetools.cpp index c55115ad75..7dc2fabe23 100644 --- a/lib/jkqtplottertools/jkqtpimagetools.cpp +++ b/lib/jkqtplottertools/jkqtpimagetools.cpp @@ -32,18 +32,18 @@ # include #endif -#define JKQTP_PALETTE_ICON_WIDTH 64 -#define JKQTP_PALETTE_IMAGEICON_HEIGHT 64 +#define jkqtp_PALETTE_ICON_WIDTH 64 +#define jkqtp_PALETTE_IMAGEICON_HEIGHT 64 QList global_jkqtpimagetools_lutstore = QList(); -bool JKQTPimagePlot_buildDefinedPaletteLessThan(const QPair &s1, const QPair &s2) +bool JKQTPImagePlot_buildDefinedPaletteLessThan(const QPair &s1, const QPair &s2) { return s1.first > items, int lut_size) { - qSort(items.begin(), items.end(), JKQTPimagePlot_buildDefinedPaletteLessThan); +void JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items, int lut_size) { + qSort(items.begin(), items.end(), JKQTPImagePlot_buildDefinedPaletteLessThan); double dmin=items.first().first; double dmax=items.last().first; @@ -71,7 +71,7 @@ void JKQTPimagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items; va_list args; @@ -85,16 +85,16 @@ void JKQTPimagePlot_buildDefinedPaletteLinInterpolate(int* lut, int N, ...) { va_end(args); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(lut, items); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(lut, items); } -void JKQTPimagePlot_buildDefinedPalette(int* lut, QList > items) { - qSort(items.begin(), items.end(), JKQTPimagePlot_buildDefinedPaletteLessThan); +void JKQTPImagePlot_buildDefinedPalette(int* lut, QList > items) { + qSort(items.begin(), items.end(), JKQTPImagePlot_buildDefinedPaletteLessThan); double dmin=items.first().first; double dmax=items.last().first; - double delta=(dmax-dmin)/double(JKQTPimagePlot_LUTSIZE); + double delta=(dmax-dmin)/double(JKQTPImagePlot_LUTSIZE); int i=0; int j=0; for (double v=dmin; v<=dmax; v=v+delta) { @@ -107,12 +107,12 @@ void JKQTPimagePlot_buildDefinedPalette(int* lut, QList > it b=qBlue(items[j].second); while (j+1=items[j+1].first) j++; } - if (i<=JKQTPimagePlot_LUTSIZE) lut[i]=qRgb(static_cast(r), static_cast(g), static_cast(b)); + if (i<=JKQTPImagePlot_LUTSIZE) lut[i]=qRgb(static_cast(r), static_cast(g), static_cast(b)); i++; } } -void JKQTPimagePlot_buildDefinedPalette(int* lut, int N, ...) { +void JKQTPImagePlot_buildDefinedPalette(int* lut, int N, ...) { QList > items; va_list args; @@ -126,11 +126,11 @@ void JKQTPimagePlot_buildDefinedPalette(int* lut, int N, ...) { va_end(args); - JKQTPimagePlot_buildDefinedPalette(lut, items); + JKQTPImagePlot_buildDefinedPalette(lut, items); } -double JKQTPimagePlot_QStringToDouble(QString value) { +double JKQTPImagePlot_QStringToDouble(QString value) { QString v=value; if (value.contains(',')) { v=value.replace(',', '.'); @@ -140,21 +140,21 @@ double JKQTPimagePlot_QStringToDouble(QString value) { return loc.toDouble(v) ; } -static QStringList JKQTPimagePlot_palettesSearchPaths=QStringList(); -static QMap > > JKQTPimagePlot_lutsFromFiles; +static QStringList JKQTPImagePlot_palettesSearchPaths=QStringList(); +static QMap > > JKQTPImagePlot_lutsFromFiles; template -bool JKQTPimagePlot_QPairCompareFirst(const QPair &s1, const QPair &s2) { +bool JKQTPImagePlot_QPairCompareFirst(const QPair &s1, const QPair &s2) { return s1.first < s2.first; } -QStringList JKQTPimagePlot_getPredefinedPalettes() { +QStringList JKQTPImagePlot_getPredefinedPalettes() { static QStringList sl; - if (JKQTPimagePlot_palettesSearchPaths.isEmpty()) { - JKQTPimagePlot_palettesSearchPaths<<":/colorpalettes/"; - JKQTPimagePlot_palettesSearchPaths<<(QApplication::applicationDirPath()+"/colorpalettes/"); - JKQTPimagePlot_palettesSearchPaths<<(QApplication::applicationDirPath()+"/assets/colorpalettes/"); + if (JKQTPImagePlot_palettesSearchPaths.isEmpty()) { + JKQTPImagePlot_palettesSearchPaths<<":/colorpalettes/"; + JKQTPImagePlot_palettesSearchPaths<<(QApplication::applicationDirPath()+"/colorpalettes/"); + JKQTPImagePlot_palettesSearchPaths<<(QApplication::applicationDirPath()+"/assets/colorpalettes/"); } if (sl.size()<=0) { @@ -226,8 +226,8 @@ QStringList JKQTPimagePlot_getPredefinedPalettes() { #ifdef QT_XML_LIB int palID=sl.size(); #endif - for (int i=0; i=0) { has4=true; - double r=JKQTPimagePlot_QStringToDouble(rx4.cap(3)); - double g=JKQTPimagePlot_QStringToDouble(rx4.cap(4)); - double b=JKQTPimagePlot_QStringToDouble(rx4.cap(5)); + double r=JKQTPImagePlot_QStringToDouble(rx4.cap(3)); + double g=JKQTPImagePlot_QStringToDouble(rx4.cap(4)); + double b=JKQTPImagePlot_QStringToDouble(rx4.cap(5)); if (r>1.0 || g>1.0 || b>1.0) { rgb255=true; } } else if (rx3.indexIn(slt[i])>=0) { has4=false; - double r=JKQTPimagePlot_QStringToDouble(rx3.cap(1)); - double g=JKQTPimagePlot_QStringToDouble(rx3.cap(3)); - double b=JKQTPimagePlot_QStringToDouble(rx3.cap(4)); + double r=JKQTPImagePlot_QStringToDouble(rx3.cap(1)); + double g=JKQTPImagePlot_QStringToDouble(rx3.cap(3)); + double b=JKQTPImagePlot_QStringToDouble(rx3.cap(4)); if (r>1.0 || g>1.0 || b>1.0) { rgb255=true; } @@ -279,15 +279,15 @@ QStringList JKQTPimagePlot_getPredefinedPalettes() { double x=0; double r=0, g=0, b=0; if (has4 && rx4.indexIn(slt[i])>=0) { - x=JKQTPimagePlot_QStringToDouble(rx4.cap(1)); - r=JKQTPimagePlot_QStringToDouble(rx4.cap(3)); - g=JKQTPimagePlot_QStringToDouble(rx4.cap(4)); - b=JKQTPimagePlot_QStringToDouble(rx4.cap(5)); + x=JKQTPImagePlot_QStringToDouble(rx4.cap(1)); + r=JKQTPImagePlot_QStringToDouble(rx4.cap(3)); + g=JKQTPImagePlot_QStringToDouble(rx4.cap(4)); + b=JKQTPImagePlot_QStringToDouble(rx4.cap(5)); } else if (!has4 && rx3.indexIn(slt[i])>=0) { x=i; - r=JKQTPimagePlot_QStringToDouble(rx3.cap(1)); - g=JKQTPimagePlot_QStringToDouble(rx3.cap(3)); - b=JKQTPimagePlot_QStringToDouble(rx3.cap(4)); + r=JKQTPImagePlot_QStringToDouble(rx3.cap(1)); + g=JKQTPImagePlot_QStringToDouble(rx3.cap(3)); + b=JKQTPImagePlot_QStringToDouble(rx3.cap(4)); //qDebug()<1) { sl<); - JKQTPimagePlot_lutsFromFiles[sl.size()-1]=pal; + qStableSort(pal.begin(), pal.end(), JKQTPImagePlot_QPairCompareFirst); + JKQTPImagePlot_lutsFromFiles[sl.size()-1]=pal; palID=sl.size(); //qDebug()<<"read "< 255.0) r = 255.0; @@ -746,12 +746,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageINVERTED_RAINBOW) //gnuplot: 33,13,10 { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=JKQTPimagePlot_LUTSIZE; l>=0; l--) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=JKQTPImagePlot_LUTSIZE; l>=0; l--) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 255.0*std::abs(2.0*v-0.5); if (r > 255.0) r = 255.0; @@ -770,11 +770,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_hot; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = 765.0*v; if (r > 255.0) r = 255.0; @@ -798,11 +798,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_hot_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=JKQTPimagePlot_LUTSIZE; l>=0; l--) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=JKQTPImagePlot_LUTSIZE; l>=0; l--) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 765.0*v; if (r > 255.0) r = 255.0; @@ -826,11 +826,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_ocean; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = 765.0*v-510.0; if (r < 0.0) r = 0.0; @@ -848,11 +848,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_ocean_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=JKQTPimagePlot_LUTSIZE; l>=0; l--) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=JKQTPImagePlot_LUTSIZE; l>=0; l--) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 765.0*v-510.0; if (r < 0.0) r = 0.0; @@ -869,11 +869,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_bluemagentayellow; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = (v/0.32-0.78125); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -899,11 +899,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_bluemagentayellow_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = (v/0.32-0.78125); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -929,11 +929,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_blueyellow; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = sqrt(sqrt(v)); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -956,11 +956,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_blueyellow_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = sqrt(sqrt(v)); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -983,11 +983,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_cyan; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = v*0.5; if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -1010,11 +1010,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_cyan_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = v*0.5; if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -1037,11 +1037,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_trafficlight; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=l/(double)(JKQTPImagePlot_LUTSIZE); double r = (v < 0.5) ? 128.0*sin(M_PI*(2.0*v-0.5))+128.0 : 255.0; if (r > 255.0) r = 255.0; @@ -1060,11 +1060,11 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_trafficlight_inverted; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = (v < 0.5) ? 128.0*sin(M_PI*(2.0*v-0.5))+128.0 : 255.0; if (r > 255.0) r = 255.0; @@ -1082,7 +1082,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet else if (palette == JKQTPMathImageBLUEWHITERED) //gnuplot: 34,13,-34 { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1096,7 +1096,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(2.0, 0xFF4393C3); lst<(1.0, 0xFF2166AC); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1104,7 +1104,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet else if (palette == JKQTPMathImageREDWHITEBLUE) //gnuplot: https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/RdBu.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1118,7 +1118,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(6.0, 0xFF4393C3); lst<(7.0, 0xFF2166AC); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1129,12 +1129,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { // int*& plut=&lut_BLACKBLUEREDYELLOW; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 255.0*qBound(0.0,sqrt(v),1.0); double g = 255.0*qBound(0.0,v*v*v,1.0); double b = 255.0*qBound(0.0,sin(2.0*M_PI*v),1.0); @@ -1148,12 +1148,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_GREENREDVIOLET; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 255.0*qBound(0.0,v,1.0); double g = 255.0*qBound(0.0,fabs(v-0.5),1.0); double b = 255.0*qBound(0.0,v*v*v*v,1.0); @@ -1167,12 +1167,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_BLACKBLUEVIOLETYELLOWWHITE; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 255.0*qBound(0.0,v/0.32-0.78125,1.0); double g = 255.0*qBound(0.0,v/0.32-0.78125,1.0); double b = 255.0*qBound(0.0,(v<0.25)?4*v:(v<0.42)?1.0:(v<0.92)?-2.0*v+1.84:v/0.08-11.5,1.0); @@ -1186,12 +1186,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet { //int*& plut=&lut_WHITEYELLOWVIOLETBLUEBLACK; if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); double r = 255.0*qBound(0.0,v/0.32-0.78125,1.0); double g = 255.0*qBound(0.0,v/0.32-0.78125,1.0); double b = 255.0*qBound(0.0,(v<0.25)?4*v:(v<0.42)?1.0:(v<0.92)?-2.0*v+1.84:v/0.08-11.5,1.0); @@ -1204,7 +1204,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageBR_GR) //https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/BrBG.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1218,14 +1218,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(6.0, 0xFF35978F); lst<(7.0, 0xFF01665E); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageBR_GR_STEP) //https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/BrBG.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1239,14 +1239,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(6.0, 0xFF35978F); lst<(7.0, 0xFF01665E); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImagePU_OR) //https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/PuOr.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1261,14 +1261,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF8073AC); lst<(8.0, 0xFF542788); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImagePU_OR_STEP) //https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/PuOr.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1283,14 +1283,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF8073AC); lst<(8.0, 0xFF542788); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageYL_GN_BU) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1305,14 +1305,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF253494); lst<(8.0, 0xFF081D58); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageYL_GN_BU_STEP) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1327,7 +1327,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF253494); lst<(8.0, 0xFF081D58); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; @@ -1335,7 +1335,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageGN_BU) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1350,14 +1350,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF0868AC); lst<(8.0, 0xFF084081); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageGN_BU_STEP) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1372,14 +1372,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF0868AC); lst<(8.0, 0xFF084081); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageBU_GN) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1394,14 +1394,14 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, 0xFF0868AC); lst<(0.0, 0xFF084081); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageBU_GN_STEP) //http://colorbrewer2.org/ { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1416,19 +1416,19 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, 0xFF0868AC); lst<(0.0, 0xFF084081); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; } else if (palette == JKQTPMathImageINVERTED_MAGENTA) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,1,0,v).rgba(); } @@ -1438,12 +1438,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageMAGENTA) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,1,0,v).rgba(); } @@ -1453,12 +1453,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageINVERTED_YELLOW) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,0,1,v).rgba(); } @@ -1468,12 +1468,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageYELLOW) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,0,1,v).rgba(); } @@ -1484,12 +1484,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageINVERTED_MAGENTAWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,v,0,0).rgba(); } @@ -1499,12 +1499,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageMAGENTAWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,v,0,0).rgba(); } @@ -1514,12 +1514,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageINVERTED_YELLOWWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,0,v,0).rgba(); } @@ -1529,12 +1529,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageYELLOWWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(0,0,v,0).rgba(); } @@ -1545,12 +1545,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageINVERTED_CYANWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(v,0,0,0).rgba(); } @@ -1560,12 +1560,12 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageCYANWHITE) // from CMYK model { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - for (int l=0; l<=JKQTPimagePlot_LUTSIZE; l++) { - double v=(JKQTPimagePlot_LUTSIZE-l)/(double)(JKQTPimagePlot_LUTSIZE); + for (int l=0; l<=JKQTPImagePlot_LUTSIZE; l++) { + double v=(JKQTPImagePlot_LUTSIZE-l)/(double)(JKQTPImagePlot_LUTSIZE); plut[l]=QColor::fromCmykF(v,0,0,0).rgba(); } @@ -1575,7 +1575,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageBlueGreenRed) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1584,7 +1584,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(2.0, QColor("green").rgb()); lst<(3.0, QColor("red").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1592,7 +1592,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImageRedGreenBlue) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1601,7 +1601,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(2.0, QColor("green").rgb()); lst<(3.0, QColor("blue").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1610,7 +1610,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImagePREDEFINED_PALETTES_COUNT) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1618,7 +1618,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, QColor("magenta").rgb()); lst<(2.0, QColor("yellow").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1626,7 +1626,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImagePREDEFINED_PALETTES_COUNT+1) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1634,7 +1634,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, QColor("yellow").rgb()); lst<(2.0, QColor("magenta").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1642,7 +1642,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImagePREDEFINED_PALETTES_COUNT+2) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1650,7 +1650,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, QColor("red").rgb()); lst<(2.0, QColor("blue").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1658,7 +1658,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImagePREDEFINED_PALETTES_COUNT+3) { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1666,7 +1666,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(1.0, QColor("blue").rgb()); lst<(2.0, QColor("red").rgb()); - JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, lst); + JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, lst); } } lut_used=lutstore[palette]; @@ -1676,7 +1676,7 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet } else if (palette == JKQTPMathImagePU_OR) //https://github.com/aschn/gnuplot-colorbrewer/blob/master/diverging/PuOr.plt { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { @@ -1691,22 +1691,22 @@ int* JKQTPimagePlot_getCreateLUT(QList& lutstore, JKQTPMathImageColorPalet lst<(7.0, 0xFF); lst<(8.0, 0xFF); - JKQTPimagePlot_buildDefinedPalette(plut, lst); + JKQTPImagePlot_buildDefinedPalette(plut, lst); } } lut_used=lutstore[palette]; */ - } else if (JKQTPimagePlot_lutsFromFiles.contains(palette)) // LUTs read from files in JKQTPimagePlot_lutsFromFiles + } else if (JKQTPImagePlot_lutsFromFiles.contains(palette)) // LUTs read from files in JKQTPImagePlot_lutsFromFiles { if (lutstore[palette]==nullptr) { - lutstore[palette]=(int*)malloc((JKQTPimagePlot_LUTSIZE+2)*sizeof(int)); + lutstore[palette]=(int*)malloc((JKQTPImagePlot_LUTSIZE+2)*sizeof(int)); int* plut=lutstore[palette]; //std::cout<<"!!! creating rainbow lut\n"; if (plut!=nullptr) { - if (JKQTPimagePlot_lutsFromFiles[palette].size()>220) JKQTPimagePlot_buildDefinedPalette(plut, JKQTPimagePlot_lutsFromFiles[palette]); - else JKQTPimagePlot_buildDefinedPaletteLinInterpolate(plut, JKQTPimagePlot_lutsFromFiles[palette]); + if (JKQTPImagePlot_lutsFromFiles[palette].size()>220) JKQTPImagePlot_buildDefinedPalette(plut, JKQTPImagePlot_lutsFromFiles[palette]); + else JKQTPImagePlot_buildDefinedPaletteLinInterpolate(plut, JKQTPImagePlot_lutsFromFiles[palette]); } } lut_used=lutstore[palette]; @@ -1727,7 +1727,7 @@ QImage JKQTPMathImageGetPaletteImage(int i, int width, int height) for (int j=0; j(pic, width, height, img, (JKQTPMathImageColorPalette)i, Qt::black, Qt::black); + JKQTPImagePlot_array2image(pic, width, height, img, (JKQTPMathImageColorPalette)i, Qt::black, Qt::black); free(pic); return img; } @@ -1751,7 +1751,7 @@ QImage JKQTPMathImageGetPaletteImage(int *lut, int lut_size, int width) for (int j=0; j(pic, width, 1, img, lut, lut_size, Qt::black, Qt::black); + JKQTPImagePlot_array2image(pic, width, 1, img, lut, lut_size, Qt::black, Qt::black); free(pic); return img; } @@ -1759,9 +1759,9 @@ QImage JKQTPMathImageGetPaletteImage(int *lut, int lut_size, int width) QIcon JKQTPMathImageGetPaletteIcon(int i) { - QImage img=JKQTPMathImageGetPaletteImage(i, JKQTP_PALETTE_ICON_WIDTH); - QPixmap pix(JKQTP_PALETTE_ICON_WIDTH,8); - QRect r(0,0,JKQTP_PALETTE_ICON_WIDTH-1,7); + QImage img=JKQTPMathImageGetPaletteImage(i, jkqtp_PALETTE_ICON_WIDTH); + QPixmap pix(jkqtp_PALETTE_ICON_WIDTH,8); + QRect r(0,0,jkqtp_PALETTE_ICON_WIDTH-1,7); QPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -1803,7 +1803,7 @@ QImage JKQTPMathImageGetAlphaPaletteImage(int *lut, int lut_size, int width, int sl2[x+img1.width()/2]=QColor(Qt::black).rgba(); } } - JKQTPimagePlot_array2image(pic, width, 1, img, l1.data(), lut_size, Qt::black, Qt::black); + JKQTPImagePlot_array2image(pic, width, 1, img, l1.data(), lut_size, Qt::black, Qt::black); free(pic); QImage img2(width, height, QImage::Format_ARGB32); QPainter p(&img2); @@ -1824,10 +1824,10 @@ QImage JKQTPMathImageGetAlphaPaletteImage(int *lut, int lut_size, int width, int -JKQTPColorPaletteTools::JKQTPColorPaletteTools(JKQtBasePlotter *parent) +JKQTPColorPaletteTools::JKQTPColorPaletteTools(JKQTBasePlotter *parent) { cbParent=parent; - colorBarRightAxis=new JKQTPverticalIndependentAxis(0, 100, 0, 100, parent); + colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); @@ -1837,7 +1837,7 @@ JKQTPColorPaletteTools::JKQTPColorPaletteTools(JKQtBasePlotter *parent) colorBarRightAxis->set_minorTicks(0); colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); - colorBarTopAxis=new JKQTPhorizontalIndependentAxis(0, 100, 0, 100, parent); + colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); @@ -1929,7 +1929,7 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect } } QImage b(h, 200, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(d, h, 200, b, palette, 0, 199); + JKQTPImagePlot_array2image(d, h, 200, b, palette, 0, 199); /*cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); @@ -1978,7 +1978,7 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect /*uint8_t d[200]; for (int i=0; i<200; i++) d[i]=i; QImage b(200,1, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(d, 200, 1, b, palette, 0, 199);*/ + JKQTPImagePlot_array2image(d, 200, 1, b, palette, 0, 199);*/ static const uint8_t h=1; @@ -1991,7 +1991,7 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect } } QImage b(h,200, QImage::Format_ARGB32); - JKQTPimagePlot_array2image(d,h,200, b, palette, 0, 199); + JKQTPImagePlot_array2image(d,h,200, b, palette, 0, 199); @@ -2045,7 +2045,7 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect QStringList JKQTPColorPaletteTools::getPalettes() { - return JKQTPimagePlot_getPredefinedPalettes(); + return JKQTPImagePlot_getPredefinedPalettes(); } int JKQTPColorPaletteTools::getPalettesCount() @@ -2054,9 +2054,9 @@ int JKQTPColorPaletteTools::getPalettesCount() } QIcon JKQTPColorPaletteTools::getPaletteIcon(int i) { - QImage img=getPaletteImage(i, JKQTP_PALETTE_ICON_WIDTH); - QPixmap pix(JKQTP_PALETTE_ICON_WIDTH,8); - QRect r(0,0,JKQTP_PALETTE_ICON_WIDTH-1,7); + QImage img=getPaletteImage(i, jkqtp_PALETTE_ICON_WIDTH); + QPixmap pix(jkqtp_PALETTE_ICON_WIDTH,8); + QRect r(0,0,jkqtp_PALETTE_ICON_WIDTH-1,7); QPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -2077,7 +2077,7 @@ QImage JKQTPColorPaletteTools::getPaletteImage(int i, int width) for (int j=0; j(pic, width, 1, img, (JKQTPMathImageColorPalette)i, 0, width-1); + JKQTPImagePlot_array2image(pic, width, 1, img, (JKQTPMathImageColorPalette)i, 0, width-1); free(pic); return img; } @@ -2089,9 +2089,9 @@ QImage JKQTPColorPaletteTools::getPaletteImage(JKQTPMathImageColorPalette palett QIcon JKQTPColorPaletteTools::getPaletteKeyIcon(int i) { - QImage img=getPaletteKeyImage(i, JKQTP_PALETTE_ICON_WIDTH, JKQTP_PALETTE_IMAGEICON_HEIGHT); - QPixmap pix(JKQTP_PALETTE_ICON_WIDTH,JKQTP_PALETTE_IMAGEICON_HEIGHT); - QRect r(0,0,JKQTP_PALETTE_ICON_WIDTH-1,JKQTP_PALETTE_IMAGEICON_HEIGHT-1); + QImage img=getPaletteKeyImage(i, jkqtp_PALETTE_ICON_WIDTH, jkqtp_PALETTE_IMAGEICON_HEIGHT); + QPixmap pix(jkqtp_PALETTE_ICON_WIDTH,jkqtp_PALETTE_IMAGEICON_HEIGHT); + QRect r(0,0,jkqtp_PALETTE_ICON_WIDTH-1,jkqtp_PALETTE_IMAGEICON_HEIGHT-1); QPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -2126,7 +2126,7 @@ QImage JKQTPColorPaletteTools::getPaletteKeyImage(int i, int width, int height) pic[j]=exp(-0.5*(double((x-x01)*double(x-x01))/w1x+double((y-y01)*double(y-y01))/w1y))+0.7*exp(-0.5*(double((x-x02)*double(x-x02))/w2x+double((y-y02)*double(y-y02))/w2y)); if (pic[j]>mmax) mmax=pic[j]; } - JKQTPimagePlot_array2image(pic, width, height, img, (JKQTPMathImageColorPalette)i, 0, mmax); + JKQTPImagePlot_array2image(pic, width, height, img, (JKQTPMathImageColorPalette)i, 0, mmax); free(pic); return img; } @@ -2141,7 +2141,7 @@ void JKQTPColorPaletteTools::set_palette(int pal) { palette=(JKQTPMathImageColorPalette)pal; } -void JKQTPColorPaletteTools::cbSetParent(JKQtBasePlotter* parent) { +void JKQTPColorPaletteTools::cbSetParent(JKQTBasePlotter* parent) { cbParent=parent; colorBarRightAxis->set_parent(parent); colorBarTopAxis->set_parent(parent); diff --git a/lib/jkqtplottertools/jkqtpimagetools.h b/lib/jkqtplottertools/jkqtpimagetools.h index 9f99714c38..5d84a028c3 100644 --- a/lib/jkqtplottertools/jkqtpimagetools.h +++ b/lib/jkqtplottertools/jkqtpimagetools.h @@ -34,17 +34,17 @@ #ifndef NO_JKQTPLOTTER #include "jkqtplottertools/jkqtptools.h" -class JKQTPverticalIndependentAxis; // forward -class JKQTPhorizontalIndependentAxis; // forward -class JKQtBasePlotter; // forward +class JKQTPVerticalIndependentAxis; // forward +class JKQTPHorizontalIndependentAxis; // forward +class JKQTBasePlotter; // forward #endif /*! \brief Width of the Palette-Icons, generated e.g. by JKQTPMathImageGetPaletteIcon() \ingroup jkqtptools_qt */ -#define JKQTP_PALETTE_ICON_WIDTH 64 +#define jkqtp_PALETTE_ICON_WIDTH 64 /*! \brief Height of the Palette-Icons, generated e.g. by JKQTPMathImageGetPaletteIcon() \ingroup jkqtptools_qt */ -#define JKQTP_PALETTE_IMAGEICON_HEIGHT 64 +#define jkqtp_PALETTE_IMAGEICON_HEIGHT 64 /*! \brief available palettes for coloring an image @@ -157,7 +157,7 @@ enum JKQTPRGBMathImageRGBMode { */ template -inline QVector JKQTPimagePlot_arrayToVector(const T* input, int N) { +inline QVector JKQTPImagePlot_arrayToVector(const T* input, int N) { if (!input || N<=0) return QVector(); T dummy; QVector out(N, dummy); @@ -170,7 +170,7 @@ inline QVector JKQTPimagePlot_arrayToVector(const T* input, int N) { */ template -inline QVector JKQTPimagePlot_arrayToDVector(const T* input, int N) { +inline QVector JKQTPImagePlot_arrayToDVector(const T* input, int N) { if (!input || N<=0) return QVector(); QVector out(N, 0.0); for (int i=0; i JKQTPimagePlot_arrayToDVector(const T* input, int N) { \ingroup jkqtplotter_imagelots_tools */ -inline QVector JKQTPimagePlot_BarrayToDVector(const bool* input, int N) { +inline QVector JKQTPImagePlot_BarrayToDVector(const bool* input, int N) { if (!input || N<=0) return QVector(); QVector out(N, 0.0); for (int i=0; i JKQTPimagePlot_BarrayToDVector(const bool* input, int N) */ template -inline double JKQTPimagePlot_getImageMin(T* dbl, int width, int height) +inline double JKQTPImagePlot_getImageMin(T* dbl, int width, int height) { if (!dbl || width<=0 || height<=0) return 0; @@ -228,7 +228,7 @@ inline double JKQTPimagePlot_getImageMin(T* dbl, int width, int height) */ template -inline double JKQTPimagePlot_getImageMax(T* dbl, int width, int height) +inline double JKQTPImagePlot_getImageMax(T* dbl, int width, int height) { if (!dbl || width<=0 || height<=0) return 0; @@ -271,7 +271,7 @@ inline double JKQTPimagePlot_getImageMax(T* dbl, int width, int height) leave alpha as it is. */ template -inline void JKQTPimagePlot_array2RGBimage(T* dbl_in, int width, int height, QImage &img, int channel, T minColor, T maxColor, JKQTPRGBMathImageRGBMode rgbMode=JKQTPRGBMathImageModeRGBMode, bool logScale=false, double logBase=10.0) +inline void JKQTPImagePlot_array2RGBimage(T* dbl_in, int width, int height, QImage &img, int channel, T minColor, T maxColor, JKQTPRGBMathImageRGBMode rgbMode=JKQTPRGBMathImageModeRGBMode, bool logScale=false, double logBase=10.0) { if (!dbl_in || width<=0 || height<=0) return; @@ -508,7 +508,7 @@ inline void JKQTPimagePlot_array2RGBimage(T* dbl_in, int width, int height, QIma /*! \brief Generate a QList with \a N entries of the value \a defaultValue \ingroup jkqtptools_qt */ template -inline QList JKQTPimagePlot_makeQList(const T& defaultVal, int N=1) { +inline QList JKQTPImagePlot_makeQList(const T& defaultVal, int N=1) { QList l; for (int i=0; i JKQTPimagePlot_makeQList(const T& defaultVal, int N=1) { /*! \brief size of the lookup tables used by JKQTFPimagePlot_array2image() \ingroup jkqtplotter_imagelots_tools */ -#define JKQTPimagePlot_LUTSIZE 256 +#define JKQTPImagePlot_LUTSIZE 256 /*! \brief build a linearly interpolated palette in \a lut with \a N entries that are provided in \a items \ingroup jkqtplotter_imagelots_tools @@ -529,7 +529,7 @@ inline QList JKQTPimagePlot_makeQList(const T& defaultVal, int N=1) { \a lut needs to have \c lut_size) entries */ -void LIB_EXPORT JKQTPimagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items, int lut_size=JKQTPimagePlot_LUTSIZE); +void LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items, int lut_size=JKQTPImagePlot_LUTSIZE); /*! \brief build a linearly interpolated palette in \a lut with \a N entries that are provided as (double, QRgb) value pairss in the variable arguments \ingroup jkqtplotter_imagelots_tools @@ -539,26 +539,26 @@ void LIB_EXPORT JKQTPimagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList \a lut needs to have \c lut_size) entries */ -void LIB_EXPORT JKQTPimagePlot_buildDefinedPaletteLinInterpolate(int* lut, int N, ...); +void LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, int N, ...); /*! \brief build a palette in \a lut with \a N entries that are provided in \a items \ingroup jkqtplotter_imagelots_tools The entries in \a items are sorted by the first (double) argument and the full range is distributed - over 0 ... JKQTPimagePlot_LUTSIZE. + over 0 ... JKQTPImagePlot_LUTSIZE. - \a lut needs to have \c JKQTPimagePlot_LUTSIZE) entries + \a lut needs to have \c JKQTPImagePlot_LUTSIZE) entries */ -void LIB_EXPORT JKQTPimagePlot_buildDefinedPalette(int* lut, QList > items); +void LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, QList > items); /*! \brief build a palette in \a lut with \a N entries that are provided as as (double, QRgb) value pairss in the variable arguments \ingroup jkqtplotter_imagelots_tools */ -void LIB_EXPORT JKQTPimagePlot_buildDefinedPalette(int* lut, int N, ...); +void LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, int N, ...); /*! \brief return a list of all globally available LUTs \ingroup jkqtplotter_imagelots_tools */ -QStringList LIB_EXPORT JKQTPimagePlot_getPredefinedPalettes(); +QStringList LIB_EXPORT JKQTPImagePlot_getPredefinedPalettes(); @@ -566,12 +566,12 @@ QStringList LIB_EXPORT JKQTPimagePlot_getPredefinedPalettes(); \ingroup jkqtplotter_imagelots_tools \internal */ -LIB_EXPORT int* JKQTPimagePlot_getCreateLUT(QList &lutstore, JKQTPMathImageColorPalette palette); +LIB_EXPORT int* JKQTPImagePlot_getCreateLUT(QList &lutstore, JKQTPMathImageColorPalette palette); /*! \brief frees a list of LUTs \ingroup jkqtplotter_imagelots_tools \internal */ -void LIB_EXPORT JKQTPimagePlot_freeLUTs(QList &lutstore); +void LIB_EXPORT JKQTPImagePlot_freeLUTs(QList &lutstore); /*! \brief internal global storage object for lookup-tables @@ -585,7 +585,7 @@ extern LIB_EXPORT QList global_jkqtpimagetools_lutstore; This method uses lookup tables which are saved as static variables to convert the 2D array into an image. The luts are only created once, and stored then, so mor CPU time is saved. The precompiler define - JKQTPimagePlot_LUTSIZE sets the size of the LUTs. Note that if you don't use a specific color palette, + JKQTPImagePlot_LUTSIZE sets the size of the LUTs. Note that if you don't use a specific color palette, the according LUT won't be calculated and stored! \param dbl_in pointer to a 1D array of template type \c T representing the image to plot. This array has to be of size \a width * \a height @@ -603,7 +603,7 @@ extern LIB_EXPORT QList global_jkqtpimagetools_lutstore; \param infColor color to use for pixels that are infinity */ template -inline void JKQTPimagePlot_array2image(const T* dbl_in, int width, int height, QImage &img, JKQTPMathImageColorPalette palette, T minColor, T maxColor, JKQTPMathImageColorRangeFailAction paletteMinFail=JKQTPMathImageLastPaletteColor, JKQTPMathImageColorRangeFailAction paletteMaxFail=JKQTPMathImageLastPaletteColor, QColor minFailColor=QColor("black"), QColor maxFailColor=QColor("black"), QColor nanColor=QColor("black"), QColor infColor=QColor("black"), bool logScale=false, double logBase=10.0, const int* lutUser=0, int lutUserSize=0) +inline void JKQTPImagePlot_array2image(const T* dbl_in, int width, int height, QImage &img, JKQTPMathImageColorPalette palette, T minColor, T maxColor, JKQTPMathImageColorRangeFailAction paletteMinFail=JKQTPMathImageLastPaletteColor, JKQTPMathImageColorRangeFailAction paletteMaxFail=JKQTPMathImageLastPaletteColor, QColor minFailColor=QColor("black"), QColor maxFailColor=QColor("black"), QColor nanColor=QColor("black"), QColor infColor=QColor("black"), bool logScale=false, double logBase=10.0, const int* lutUser=0, int lutUserSize=0) { if (!dbl_in || width<=0 || height<=0) return; @@ -650,8 +650,8 @@ inline void JKQTPimagePlot_array2image(const T* dbl_in, int width, int height, Q const int* lut_used=nullptr; - int lutSize=JKQTPimagePlot_LUTSIZE; - if (global_jkqtpimagetools_lutstore.size()<=0) global_jkqtpimagetools_lutstore=JKQTPimagePlot_makeQList(nullptr, JKQTPimagePlot_getPredefinedPalettes().size()+2); + int lutSize=JKQTPImagePlot_LUTSIZE; + if (global_jkqtpimagetools_lutstore.size()<=0) global_jkqtpimagetools_lutstore=JKQTPImagePlot_makeQList(nullptr, JKQTPImagePlot_getPredefinedPalettes().size()+2); img = QImage(width, height, QImage::Format_ARGB32); @@ -665,7 +665,7 @@ inline void JKQTPimagePlot_array2image(const T* dbl_in, int width, int height, Q lutSize=lutUserSize; //qDebug()<<"user palette "< -inline void JKQTPimagePlot_array2image(const T* dbl_in, int width, int height, QImage &img, const int* lutUser, int lutUserSize, T minColor, T maxColor, JKQTPMathImageColorRangeFailAction paletteMinFail=JKQTPMathImageLastPaletteColor, JKQTPMathImageColorRangeFailAction paletteMaxFail=JKQTPMathImageLastPaletteColor, QColor minFailColor=QColor("black"), QColor maxFailColor=QColor("black"), QColor nanColor=QColor("black"), QColor infColor=QColor("black"), bool logScale=false, double logBase=10.0) +inline void JKQTPImagePlot_array2image(const T* dbl_in, int width, int height, QImage &img, const int* lutUser, int lutUserSize, T minColor, T maxColor, JKQTPMathImageColorRangeFailAction paletteMinFail=JKQTPMathImageLastPaletteColor, JKQTPMathImageColorRangeFailAction paletteMaxFail=JKQTPMathImageLastPaletteColor, QColor minFailColor=QColor("black"), QColor maxFailColor=QColor("black"), QColor nanColor=QColor("black"), QColor infColor=QColor("black"), bool logScale=false, double logBase=10.0) { - JKQTPimagePlot_array2image(dbl_in, width, height, img, JKQTPMathImageUSER_PALETTE, minColor, maxColor, paletteMinFail, paletteMaxFail, minFailColor, maxFailColor, nanColor, infColor, logScale, logBase, lutUser, lutUserSize); + JKQTPImagePlot_array2image(dbl_in, width, height, img, JKQTPMathImageUSER_PALETTE, minColor, maxColor, paletteMinFail, paletteMaxFail, minFailColor, maxFailColor, nanColor, infColor, logScale, logBase, lutUser, lutUserSize); } -/*! \brief generates a QImage with width \a width and height 1 for the i-th color palette (\a i is based on the list returned by JKQTPimagePlot_getPredefinedPalettes() ) +/*! \brief generates a QImage with width \a width and height 1 for the i-th color palette (\a i is based on the list returned by JKQTPImagePlot_getPredefinedPalettes() ) \ingroup jkqtplotter_imagelots_tools */ QImage LIB_EXPORT JKQTPMathImageGetPaletteImage(int i, int width); -/*! \brief generates a QImage with width \a width and height \a height for the i-th color palette (\a i is based on the list returned by JKQTPimagePlot_getPredefinedPalettes() ) +/*! \brief generates a QImage with width \a width and height \a height for the i-th color palette (\a i is based on the list returned by JKQTPImagePlot_getPredefinedPalettes() ) \ingroup jkqtplotter_imagelots_tools */ QImage LIB_EXPORT JKQTPMathImageGetPaletteImage(int i, int width, int height); /*! \brief generates a QImage with width \a width and height 1 for a specific JKQTPMathImageColorPalette @@ -758,7 +758,7 @@ QImage LIB_EXPORT JKQTPMathImageGetPaletteImage(int* lut, int lut_size, int widt \ingroup jkqtplotter_imagelots_tools */ QImage LIB_EXPORT JKQTPMathImageGetAlphaPaletteImage(int* lut, int lut_size, int width, int height); -/*! \brief generates a QIcon for the i-th color palette (\a i is based on the list returned by JKQTPimagePlot_getPredefinedPalettes() ) +/*! \brief generates a QIcon for the i-th color palette (\a i is based on the list returned by JKQTPImagePlot_getPredefinedPalettes() ) \ingroup jkqtplotter_imagelots_tools */ QIcon LIB_EXPORT JKQTPMathImageGetPaletteIcon(int i) ; @@ -777,7 +777,7 @@ QIcon LIB_EXPORT JKQTPMathImageGetPaletteIcon(JKQTPMathImageColorPalette palette class LIB_EXPORT JKQTPColorPaletteTools { public: - JKQTPColorPaletteTools(JKQtBasePlotter *parent); + JKQTPColorPaletteTools(JKQTBasePlotter *parent); virtual ~JKQTPColorPaletteTools(); /*! \brief get list with all available palettes */ @@ -821,7 +821,7 @@ class LIB_EXPORT JKQTPColorPaletteTools { void cbDrawOutside(JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace); - void cbSetParent(JKQtBasePlotter* parent); + void cbSetParent(JKQTBasePlotter* parent); /** \brief determine min/max data value of the image */ @@ -833,7 +833,7 @@ class LIB_EXPORT JKQTPColorPaletteTools { protected: - JKQtBasePlotter* cbParent; + JKQTBasePlotter* cbParent; /** \brief top color bar visible */ @@ -880,8 +880,8 @@ class LIB_EXPORT JKQTPColorPaletteTools { * * \note this axis has some kind of a special role. It is used to format color bar axes */ - JKQTPverticalIndependentAxis* colorBarRightAxis; - JKQTPhorizontalIndependentAxis* colorBarTopAxis; + JKQTPVerticalIndependentAxis* colorBarRightAxis; + JKQTPHorizontalIndependentAxis* colorBarTopAxis; @@ -1128,13 +1128,13 @@ class LIB_EXPORT JKQTPColorPaletteTools { /*! \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis
. \see colorBarRightAxis for more information */ - inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { + inline JKQTPVerticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } /*! \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis
. \see colorBarTopAxis for more information */ - inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { + inline JKQTPHorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } /*! \brief sets the property colorBarTopVisible to the specified \a __value. diff --git a/lib/jkqtplottertools/jkqtpmathparser.cpp b/lib/jkqtplottertools/jkqtpmathparser.cpp index caae0846eb..068a9b2522 100644 --- a/lib/jkqtplottertools/jkqtpmathparser.cpp +++ b/lib/jkqtplottertools/jkqtpmathparser.cpp @@ -28,6 +28,31 @@ #include #include +#ifndef __WINDOWS__ +# ifndef __LINUX__ +# warning("these methods are ment to be used under windows or linux ... no other system were tested") +# endif +#endif + +/* This just distinguishes between the different path formats on Windows and Unix: + * - on Windows you use a backslash '\' do separate directories + * - in Unix you use a slash '/' to separate directories + */ +#ifdef __WINDOWS__ + /** \brief a separator between two directories in a path between \c " quotes */ + #define JKQTPPATHSEPARATOR_STRING "\\" + /** \brief a separator between two directories in a path between \c ' quotes */ + #define JKQTPPATHSEPARATOR_CHAR '\\' + #include + #include +#else + /** \brief a separator between two directories in a path between \c " quotes */ + #define JKQTPPATHSEPARATOR_STRING "/" + /** \brief a separator between two directories in a path between \c ' quotes */ + #define JKQTPPATHSEPARATOR_CHAR '/' + #include + #include +#endif /****************************************************************************************** diff --git a/lib/jkqtplottertools/jkqtpmathparser.h b/lib/jkqtplottertools/jkqtpmathparser.h index 86c53e335f..40ca99742d 100644 --- a/lib/jkqtplottertools/jkqtpmathparser.h +++ b/lib/jkqtplottertools/jkqtpmathparser.h @@ -24,7 +24,7 @@ In this group there are classes that form a parser and evaluator for mathematical expressions. In the context of the sequencer program this is a tool class that can be used by the classes - in the project. E.g. used by JKQTPxParsedFunctionLineGraph, JKQTPyParsedFunctionLineGraph + in the project. E.g. used by JKQTPXParsedFunctionLineGraph, JKQTPYParsedFunctionLineGraph */ diff --git a/lib/jkqtplottertools/jkqtptools.cpp b/lib/jkqtplottertools/jkqtptools.cpp index 060344448a..c4eb1ee9ef 100644 --- a/lib/jkqtplottertools/jkqtptools.cpp +++ b/lib/jkqtplottertools/jkqtptools.cpp @@ -263,7 +263,7 @@ std::string jkqtp_tolower(const std::string& s){ -QString JKQTP_QPenStyle2String(Qt::PenStyle style) { +QString jkqtp_QPenStyle2String(Qt::PenStyle style) { switch(style) { case Qt::DashLine: return "dash"; case Qt::DotLine: return "dot"; @@ -274,7 +274,7 @@ QString JKQTP_QPenStyle2String(Qt::PenStyle style) { } } -Qt::PenStyle JKQTP_String2QPenStyle(QString style) { +Qt::PenStyle jkqtp_String2QPenStyle(QString style) { QString s=style.toLower().trimmed(); if (s=="dash" || s=="--") return Qt::DashLine; if (s=="dot" || s=="." || s=="..") return Qt::DotLine; @@ -284,7 +284,7 @@ Qt::PenStyle JKQTP_String2QPenStyle(QString style) { return Qt::SolidLine; } -QString JKQTP_QBrushStyle2String(Qt::BrushStyle style) { +QString jkqtp_QBrushStyle2String(Qt::BrushStyle style) { switch(style) { case Qt::NoBrush: return "none"; @@ -309,7 +309,7 @@ QString JKQTP_QBrushStyle2String(Qt::BrushStyle style) { } } -Qt::BrushStyle JKQTP_String2QBrushStyle(QString style) { +Qt::BrushStyle jkqtp_String2QBrushStyle(QString style) { QString s=style.toLower().trimmed(); if (s=="none") return Qt::NoBrush; if (s=="d1") return Qt::Dense1Pattern; @@ -333,7 +333,7 @@ Qt::BrushStyle JKQTP_String2QBrushStyle(QString style) { -QString JKQTPCAdrawMode2String(JKQTPCAdrawMode pos) { +QString JKQTPCADrawMode2String(JKQTPCADrawMode pos) { switch(pos) { case JKQTPCADMcomplete: return "all"; case JKQTPCADMticksAndLabels: return "ticks+labels"; @@ -344,7 +344,7 @@ QString JKQTPCAdrawMode2String(JKQTPCAdrawMode pos) { return ""; } -JKQTPCAdrawMode String2JKQTPCAdrawMode(QString pos) { +JKQTPCADrawMode String2JKQTPCADrawMode(QString pos) { QString s=pos.trimmed().toLower(); if (s=="all") return JKQTPCADMcomplete; if (s=="ticks+labels") return JKQTPCADMticksAndLabels; @@ -376,7 +376,7 @@ JKQTPLabelTickMode String2JKQTPLabelTickMode(QString pos) { -QString JKQTPCAlabelType2String(JKQTPCAlabelType pos) { +QString JKQTPCALabelType2String(JKQTPCALabelType pos) { switch(pos) { case JKQTPCALTdefault: return "default"; case JKQTPCALTexponentCharacter: return "exponent_character"; @@ -388,7 +388,7 @@ QString JKQTPCAlabelType2String(JKQTPCAlabelType pos) { return ""; } -JKQTPCAlabelType String2JKQTPCAlabelType(QString pos) { +JKQTPCALabelType String2JKQTPCALabelType(QString pos) { QString s=pos.trimmed().toLower(); if (s=="default") return JKQTPCALTdefault; if (s=="exponent_character") return JKQTPCALTexponentCharacter; @@ -399,196 +399,196 @@ JKQTPCAlabelType String2JKQTPCAlabelType(QString pos) { return JKQTPCALTdefault; } -QString JKQTPlabelPosition2String(JKQTPlabelPosition pos) { +QString JKQTPLabelPosition2String(JKQTPLabelPosition pos) { switch(pos) { - case JKQTPlabelMin: return "min"; - case JKQTPlabelMax: return "max"; - case JKQTPlabelCenter: return "center"; + case JKQTPLabelMin: return "min"; + case JKQTPLabelMax: return "max"; + case JKQTPLabelCenter: return "center"; } return ""; } -JKQTPlabelPosition String2JKQTPlabelPosition(QString pos) { +JKQTPLabelPosition String2JKQTPLabelPosition(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="min") return JKQTPlabelMin; - if (s=="max") return JKQTPlabelMax; - if (s=="center") return JKQTPlabelCenter; - return JKQTPlabelCenter; + if (s=="min") return JKQTPLabelMin; + if (s=="max") return JKQTPLabelMax; + if (s=="center") return JKQTPLabelCenter; + return JKQTPLabelCenter; } -QString JKQTPkeyPosition2String(JKQTPkeyPosition pos) { +QString JKQTPKeyPosition2String(JKQTPKeyPosition pos) { switch(pos) { - case JKQTPkeyOutsideLeftBottom: return "outside_leftbottom"; - case JKQTPkeyOutsideTopLeft: return "outside_topleft"; - case JKQTPkeyOutsideTopRight: return "outside_topright"; - case JKQTPkeyOutsideLeftTop: return "outside_lefttop"; + case JKQTPKeyOutsideLeftBottom: return "outside_leftbottom"; + case JKQTPKeyOutsideTopLeft: return "outside_topleft"; + case JKQTPKeyOutsideTopRight: return "outside_topright"; + case JKQTPKeyOutsideLeftTop: return "outside_lefttop"; - case JKQTPkeyOutsideRightBottom: return "outside_rightbottom"; - case JKQTPkeyOutsideBottomLeft: return "outside_bottomleft"; - case JKQTPkeyOutsideBottomRight: return "outside_bottomright"; - case JKQTPkeyOutsideRightTop: return "outside_righttop"; + case JKQTPKeyOutsideRightBottom: return "outside_rightbottom"; + case JKQTPKeyOutsideBottomLeft: return "outside_bottomleft"; + case JKQTPKeyOutsideBottomRight: return "outside_bottomright"; + case JKQTPKeyOutsideRightTop: return "outside_righttop"; - case JKQTPkeyInsideBottomRight: return "inside_bottomright"; - case JKQTPkeyInsideTopLeft: return "inside_topleft"; - case JKQTPkeyInsideTopRight: return "inside_topright"; - case JKQTPkeyInsideBottomLeft: return "inside_bottomleft"; + case JKQTPKeyInsideBottomRight: return "inside_bottomright"; + case JKQTPKeyInsideTopLeft: return "inside_topleft"; + case JKQTPKeyInsideTopRight: return "inside_topright"; + case JKQTPKeyInsideBottomLeft: return "inside_bottomleft"; } return ""; } -JKQTPkeyPosition String2JKQTPkeyPosition(QString pos) { +JKQTPKeyPosition String2JKQTPKeyPosition(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="outside_bottom" || s=="outsidebottom" || s=="outside_leftbottom" || s=="outsideleftbottom" || s=="olb") return JKQTPkeyOutsideLeftBottom; - if (s=="outside_left" || s=="outsideleft" || s=="outside_topleft" || s=="outsidetopleft" || s=="otl") return JKQTPkeyOutsideTopLeft; - if (s=="outside_right" || s=="outsideright" || s=="outside_topright" || s=="outsidetopright" || s=="otr") return JKQTPkeyOutsideTopRight; - if (s=="outside_top" || s=="outsidetop" || s=="outside_lefttop" || s=="outsidelefttop" || s=="olt") return JKQTPkeyOutsideLeftTop; + if (s=="outside_bottom" || s=="outsidebottom" || s=="outside_leftbottom" || s=="outsideleftbottom" || s=="olb") return JKQTPKeyOutsideLeftBottom; + if (s=="outside_left" || s=="outsideleft" || s=="outside_topleft" || s=="outsidetopleft" || s=="otl") return JKQTPKeyOutsideTopLeft; + if (s=="outside_right" || s=="outsideright" || s=="outside_topright" || s=="outsidetopright" || s=="otr") return JKQTPKeyOutsideTopRight; + if (s=="outside_top" || s=="outsidetop" || s=="outside_lefttop" || s=="outsidelefttop" || s=="olt") return JKQTPKeyOutsideLeftTop; - if (s=="outside_rightbottom" || s=="outsiderightbottom" || s=="orb" ) return JKQTPkeyOutsideRightBottom; - if (s=="outside_bottomleft" || s=="outsidebottomleft" || s=="obl" ) return JKQTPkeyOutsideBottomLeft; - if (s=="outside_bottomright" || s=="outsidebottomright" || s=="obr" ) return JKQTPkeyOutsideBottomRight; - if (s=="outside_righttop" || s=="outsiderighttop" || s=="ort" ) return JKQTPkeyOutsideRightTop; + if (s=="outside_rightbottom" || s=="outsiderightbottom" || s=="orb" ) return JKQTPKeyOutsideRightBottom; + if (s=="outside_bottomleft" || s=="outsidebottomleft" || s=="obl" ) return JKQTPKeyOutsideBottomLeft; + if (s=="outside_bottomright" || s=="outsidebottomright" || s=="obr" ) return JKQTPKeyOutsideBottomRight; + if (s=="outside_righttop" || s=="outsiderighttop" || s=="ort" ) return JKQTPKeyOutsideRightTop; - if (s=="inside_bottom" || s=="insidebottom" || s=="inside_bottomright" || s=="insidebottomright" || s=="ibr") return JKQTPkeyInsideBottomRight; - if (s=="inside_top" || s=="insidetop" || s=="inside_left" || s=="insideleft" || s=="inside_topleft" || s=="insidetopleft" || s=="itl") return JKQTPkeyInsideTopLeft; - if (s=="inside_right" || s=="insideright" || s=="inside_topright" || s=="insidetopright" || s=="itr") return JKQTPkeyInsideTopRight; - if (s=="inside_bottomleft" || s=="insidebottomleft" || s=="ibl") return JKQTPkeyInsideBottomLeft; - return JKQTPkeyInsideTopRight; + if (s=="inside_bottom" || s=="insidebottom" || s=="inside_bottomright" || s=="insidebottomright" || s=="ibr") return JKQTPKeyInsideBottomRight; + if (s=="inside_top" || s=="insidetop" || s=="inside_left" || s=="insideleft" || s=="inside_topleft" || s=="insidetopleft" || s=="itl") return JKQTPKeyInsideTopLeft; + if (s=="inside_right" || s=="insideright" || s=="inside_topright" || s=="insidetopright" || s=="itr") return JKQTPKeyInsideTopRight; + if (s=="inside_bottomleft" || s=="insidebottomleft" || s=="ibl") return JKQTPKeyInsideBottomLeft; + return JKQTPKeyInsideTopRight; } -QString JKQTPkeyLayout2String(JKQTPkeyLayout pos) { +QString JKQTPKeyLayout2String(JKQTPKeyLayout pos) { switch(pos) { - case JKQTPkeyLayoutOneColumn: return "one_column"; - case JKQTPkeyLayoutOneRow: return "one_row"; - case JKQTPkeyLayoutMultiColumn: return "multi_column"; + case JKQTPKeyLayoutOneColumn: return "one_column"; + case JKQTPKeyLayoutOneRow: return "one_row"; + case JKQTPKeyLayoutMultiColumn: return "multi_column"; } return ""; } -JKQTPkeyLayout String2JKQTPkeyLayout(QString pos) { +JKQTPKeyLayout String2JKQTPKeyLayout(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="one_column" || s=="onecolumn" || s=="one") return JKQTPkeyLayoutOneColumn; - if (s=="one_row" || s=="onerow") return JKQTPkeyLayoutOneRow; - if (s=="multi_column" || s=="multicolumn" || s=="multi") return JKQTPkeyLayoutMultiColumn; - return JKQTPkeyLayoutOneColumn; + if (s=="one_column" || s=="onecolumn" || s=="one") return JKQTPKeyLayoutOneColumn; + if (s=="one_row" || s=="onerow") return JKQTPKeyLayoutOneRow; + if (s=="multi_column" || s=="multicolumn" || s=="multi") return JKQTPKeyLayoutMultiColumn; + return JKQTPKeyLayoutOneColumn; } -QString JKQTPerrorPlotstyle2String(JKQTPerrorPlotstyle pos) { +QString JKQTPErrorPlotstyle2String(JKQTPErrorPlotstyle pos) { switch(pos) { - case JKQTPerrorBoxes: return "error_box"; - case JKQTPerrorEllipses: return "error_ell"; - case JKQTPerrorLines: return "error_lines"; - case JKQTPerrorBars: return "error_bars"; - case JKQTPerrorSimpleBars: return "error_simplebars"; - case JKQTPerrorPolygons: return "error_polygons"; - case JKQTPerrorBarsLines: return "error_bars_lines"; - case JKQTPerrorBarsPolygons: return "error_bars_polygons"; - case JKQTPerrorSimpleBarsLines: return "error_simplebars_lines"; - case JKQTPerrorSimpleBarsPolygons: return "error_simplebars_polygons"; - case JKQTPnoError: return "error_none"; + case JKQTPErrorBoxes: return "error_box"; + case JKQTPErrorEllipses: return "error_ell"; + case JKQTPErrorLines: return "error_lines"; + case JKQTPErrorBars: return "error_bars"; + case JKQTPErrorSimpleBars: return "error_simplebars"; + case JKQTPErrorPolygons: return "error_polygons"; + case JKQTPErrorBarsLines: return "error_bars_lines"; + case JKQTPErrorBarsPolygons: return "error_bars_polygons"; + case JKQTPErrorSimpleBarsLines: return "error_simplebars_lines"; + case JKQTPErrorSimpleBarsPolygons: return "error_simplebars_polygons"; + case JKQTPNoError: return "error_none"; } return ""; } -JKQTPerrorPlotstyle String2JKQTPerrorPlotstyle(QString pos) { +JKQTPErrorPlotstyle String2JKQTPErrorPlotstyle(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="error_lines") return JKQTPerrorLines; - if (s=="error_box") return JKQTPerrorBoxes; - if (s=="error_ell") return JKQTPerrorEllipses; - if (s=="error_bars") return JKQTPerrorBars; - if (s=="error_simplebars") return JKQTPerrorSimpleBars; - if (s=="error_polygons") return JKQTPerrorPolygons; - if (s=="error_bars_lines") return JKQTPerrorBarsLines; - if (s=="error_bars_polygons") return JKQTPerrorBarsPolygons; - if (s=="error_simplebars_lines") return JKQTPerrorSimpleBarsLines; - if (s=="error_simplebars_polygons") return JKQTPerrorSimpleBarsPolygons; - return JKQTPnoError; + if (s=="error_lines") return JKQTPErrorLines; + if (s=="error_box") return JKQTPErrorBoxes; + if (s=="error_ell") return JKQTPErrorEllipses; + if (s=="error_bars") return JKQTPErrorBars; + if (s=="error_simplebars") return JKQTPErrorSimpleBars; + if (s=="error_polygons") return JKQTPErrorPolygons; + if (s=="error_bars_lines") return JKQTPErrorBarsLines; + if (s=="error_bars_polygons") return JKQTPErrorBarsPolygons; + if (s=="error_simplebars_lines") return JKQTPErrorSimpleBarsLines; + if (s=="error_simplebars_polygons") return JKQTPErrorSimpleBarsPolygons; + return JKQTPNoError; } -QString JKQTPgraphSymbols2String(JKQTPgraphSymbols pos) { +QString JKQTPGraphSymbols2String(JKQTPGraphSymbols pos) { switch(pos) { - case JKQTPdot: return "symbol_dot"; - case JKQTPcross: return "symbol_cross"; - case JKQTPplus: return "symbol_plus"; - case JKQTPcircle: return "symbol_circle"; - case JKQTPfilledCircle: return "symbol_filled_circle"; - case JKQTPrect: return "symbol_rect"; - case JKQTPfilledRect: return "symbol_filled_rect"; - case JKQTPtriangle: return "symbol_triangle"; - case JKQTPfilledTriangle: return "symbol_filled_triangle"; - case JKQTPdownTriangle: return "symbol_down_triangle"; - case JKQTPfilledDownTriangle: return "symbol_filled_down_triangle"; - case JKQTPtarget: return "symbol_target"; + case JKQTPDot: return "symbol_dot"; + case JKQTPCross: return "symbol_cross"; + case JKQTPPlus: return "symbol_plus"; + case JKQTPCircle: return "symbol_circle"; + case JKQTPFilledCircle: return "symbol_filled_circle"; + case JKQTPRect: return "symbol_rect"; + case JKQTPFilledRect: return "symbol_filled_rect"; + case JKQTPTriangle: return "symbol_triangle"; + case JKQTPFilledTriangle: return "symbol_filled_triangle"; + case JKQTPDownTriangle: return "symbol_down_triangle"; + case JKQTPFilledDownTriangle: return "symbol_filled_down_triangle"; + case JKQTPTarget: return "symbol_target"; case JKQTPstar: return "symbol_star"; - case JKQTPfilledStar: return "symbol_filled_star"; - case JKQTPdiamond: return "symbol_diamond"; - case JKQTPfilledDiamond: return "symbol_filled_diamond"; - case JKQTPpentagon: return "symbol_pentagon"; - case JKQTPasterisc: return "symbol_asterisc"; - case JKQTPfilledPentagon: return "symbol_filled_pentagon"; - case JKQTPrectCross: return "symbol_rect_cross"; - case JKQTPrectPlus: return "symbol_rect_plus"; - case JKQTPnoSymbol: return "none"; + case JKQTPFilledStar: return "symbol_filled_star"; + case JKQTPDiamond: return "symbol_diamond"; + case JKQTPFilledDiamond: return "symbol_filled_diamond"; + case JKQTPPentagon: return "symbol_pentagon"; + case JKQTPAsterisc: return "symbol_asterisc"; + case JKQTPFilledPentagon: return "symbol_filled_pentagon"; + case JKQTPRectCross: return "symbol_rect_cross"; + case JKQTPRectPlus: return "symbol_rect_plus"; + case JKQTPNoSymbol: return "none"; } return ""; } -QString JKQTPgraphSymbols2NameString(JKQTPgraphSymbols pos) { +QString JKQTPGraphSymbols2NameString(JKQTPGraphSymbols pos) { switch(pos) { - case JKQTPdot: return QObject::tr("dot"); - case JKQTPcross: return QObject::tr("cross"); - case JKQTPplus: return QObject::tr("plus"); - case JKQTPcircle: return QObject::tr("circle"); - case JKQTPfilledCircle: return QObject::tr("filled circle"); - case JKQTPrect: return QObject::tr("rectangle"); - case JKQTPfilledRect: return QObject::tr("filled rectangle"); - case JKQTPtriangle: return QObject::tr("triangle"); - case JKQTPfilledTriangle: return QObject::tr("filled triangle"); - case JKQTPdownTriangle: return QObject::tr("down triangle"); - case JKQTPfilledDownTriangle: return QObject::tr("filled down triangle"); + case JKQTPDot: return QObject::tr("dot"); + case JKQTPCross: return QObject::tr("cross"); + case JKQTPPlus: return QObject::tr("plus"); + case JKQTPCircle: return QObject::tr("circle"); + case JKQTPFilledCircle: return QObject::tr("filled circle"); + case JKQTPRect: return QObject::tr("rectangle"); + case JKQTPFilledRect: return QObject::tr("filled rectangle"); + case JKQTPTriangle: return QObject::tr("triangle"); + case JKQTPFilledTriangle: return QObject::tr("filled triangle"); + case JKQTPDownTriangle: return QObject::tr("down triangle"); + case JKQTPFilledDownTriangle: return QObject::tr("filled down triangle"); case JKQTPstar: return QObject::tr("star"); - case JKQTPfilledStar: return QObject::tr("filled star"); - case JKQTPdiamond: return QObject::tr("diamond"); - case JKQTPfilledDiamond: return QObject::tr("filled diamond"); - case JKQTPpentagon: return QObject::tr("pentagon"); - case JKQTPfilledPentagon: return QObject::tr("filled pentagon"); - case JKQTPtarget: return QObject::tr("target"); - case JKQTPasterisc: return QObject::tr("asterisc"); - case JKQTPrectCross: return QObject::tr("square with cross"); - case JKQTPrectPlus: return QObject::tr("square with plus"); - case JKQTPnoSymbol: return QObject::tr("none"); + case JKQTPFilledStar: return QObject::tr("filled star"); + case JKQTPDiamond: return QObject::tr("diamond"); + case JKQTPFilledDiamond: return QObject::tr("filled diamond"); + case JKQTPPentagon: return QObject::tr("pentagon"); + case JKQTPFilledPentagon: return QObject::tr("filled pentagon"); + case JKQTPTarget: return QObject::tr("target"); + case JKQTPAsterisc: return QObject::tr("asterisc"); + case JKQTPRectCross: return QObject::tr("square with cross"); + case JKQTPRectPlus: return QObject::tr("square with plus"); + case JKQTPNoSymbol: return QObject::tr("none"); } return ""; } -JKQTPgraphSymbols String2JKQTPgraphSymbols(QString pos) { +JKQTPGraphSymbols String2JKQTPGraphSymbols(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="symbol_dot"||s=="dot"||s==".") return JKQTPdot; - if (s=="symbol_cross"||s=="cross"||s=="x") return JKQTPcross; - if (s=="symbol_plus"||s=="plus"||s=="+") return JKQTPplus; - if (s=="symbol_circle"||s=="circle"||s=="o") return JKQTPcircle; - if (s=="symbol_filled_circle"||s=="filled_circle"||s=="fo") return JKQTPfilledCircle; - if (s=="symbol_rect"||s=="rect"||s=="r") return JKQTPrect; - if (s=="symbol_filled_rect"||s=="filled_rect"||s=="fr") return JKQTPfilledRect; - if (s=="symbol_triangle"||s=="triangle"||s=="^") return JKQTPtriangle; - if (s=="symbol_filled_triangle"||s=="filled_triangle"||s=="f^") return JKQTPfilledTriangle; - if (s=="symbol_down_triangle"||s=="down_triangle"||s=="v") return JKQTPdownTriangle; - if (s=="symbol_filles_down_triangle"||s=="filles_down_triangle"||s=="symbol_filled_down_triangle"||s=="filled_down_triangle"||s=="fv") return JKQTPfilledDownTriangle; - if (s=="symbol_target"||s=="target"||s=="t") return JKQTPtarget; + if (s=="symbol_dot"||s=="dot"||s==".") return JKQTPDot; + if (s=="symbol_cross"||s=="cross"||s=="x") return JKQTPCross; + if (s=="symbol_plus"||s=="plus"||s=="+") return JKQTPPlus; + if (s=="symbol_circle"||s=="circle"||s=="o") return JKQTPCircle; + if (s=="symbol_filled_circle"||s=="filled_circle"||s=="fo") return JKQTPFilledCircle; + if (s=="symbol_rect"||s=="rect"||s=="r") return JKQTPRect; + if (s=="symbol_filled_rect"||s=="filled_rect"||s=="fr") return JKQTPFilledRect; + if (s=="symbol_triangle"||s=="triangle"||s=="^") return JKQTPTriangle; + if (s=="symbol_filled_triangle"||s=="filled_triangle"||s=="f^") return JKQTPFilledTriangle; + if (s=="symbol_down_triangle"||s=="down_triangle"||s=="v") return JKQTPDownTriangle; + if (s=="symbol_filles_down_triangle"||s=="filles_down_triangle"||s=="symbol_filled_down_triangle"||s=="filled_down_triangle"||s=="fv") return JKQTPFilledDownTriangle; + if (s=="symbol_target"||s=="target"||s=="t") return JKQTPTarget; if (s=="symbol_star"||s=="star"||s=="s") return JKQTPstar; - if (s=="symbol_filled_star"||s=="filled_star"||s=="fs") return JKQTPfilledStar; - if (s=="symbol_diamond"||s=="diamond"||s=="d") return JKQTPdiamond; - if (s=="symbol_filled_diamond"||s=="filled_diamond"||s=="fd") return JKQTPfilledDiamond; - if (s=="symbol_pentagon"||s=="pentagon"||s=="p") return JKQTPpentagon; - if (s=="symbol_filled_pentagon"||s=="filled_pentagon"||s=="fp") return JKQTPfilledPentagon; - if (s=="symbol_asterisc"||s=="asterisc"||s=="*") return JKQTPasterisc; - if (s=="symbol_rect_cross"||s=="rect_cross"||s=="rx") return JKQTPrectCross; - if (s=="symbol_rect_plus"||s=="rect_plus"||s=="r+") return JKQTPrectPlus; - return JKQTPnoSymbol; + if (s=="symbol_filled_star"||s=="filled_star"||s=="fs") return JKQTPFilledStar; + if (s=="symbol_diamond"||s=="diamond"||s=="d") return JKQTPDiamond; + if (s=="symbol_filled_diamond"||s=="filled_diamond"||s=="fd") return JKQTPFilledDiamond; + if (s=="symbol_pentagon"||s=="pentagon"||s=="p") return JKQTPPentagon; + if (s=="symbol_filled_pentagon"||s=="filled_pentagon"||s=="fp") return JKQTPFilledPentagon; + if (s=="symbol_asterisc"||s=="asterisc"||s=="*") return JKQTPAsterisc; + if (s=="symbol_rect_cross"||s=="rect_cross"||s=="rx") return JKQTPRectCross; + if (s=="symbol_rect_plus"||s=="rect_plus"||s=="r+") return JKQTPRectPlus; + return JKQTPNoSymbol; } @@ -843,23 +843,23 @@ std::string jkqtp_chartostr(char data){ } -QString JKQTPstepType2String(JKQTPstepType pos) +QString JKQTPStepType2String(JKQTPStepType pos) { switch(pos) { - case JKQTPstepLeft: return "step_left"; - case JKQTPstepCenter: return "step_center"; - case JKQTPstepRight: return "step_right"; + case JKQTPStepLeft: return "step_left"; + case JKQTPStepCenter: return "step_center"; + case JKQTPStepRight: return "step_right"; } return ""; } -JKQTPstepType String2JKQTPstepType(QString pos) +JKQTPStepType String2JKQTPStepType(QString pos) { QString s=pos.trimmed().toLower(); - if (s=="step_left"||s=="left"||s=="l") return JKQTPstepLeft; - if (s=="step_center"||s=="center"||s=="c") return JKQTPstepCenter; - if (s=="step_right"||s=="right"||s=="r") return JKQTPstepRight; + if (s=="step_left"||s=="left"||s=="l") return JKQTPStepLeft; + if (s=="step_center"||s=="center"||s=="c") return JKQTPStepCenter; + if (s=="step_right"||s=="right"||s=="r") return JKQTPStepRight; - return JKQTPstepLeft; + return JKQTPStepLeft; } diff --git a/lib/jkqtplottertools/jkqtptools.h b/lib/jkqtplottertools/jkqtptools.h index 71778db252..978d1f8253 100644 --- a/lib/jkqtplottertools/jkqtptools.h +++ b/lib/jkqtplottertools/jkqtptools.h @@ -71,39 +71,14 @@ #define JKTOOLS_TIMER_USE_TIME #endif -#ifndef __WINDOWS__ -# ifndef __LINUX__ -# warning("these methods are ment to be used under windows or linux ... no other system were tested") -# endif -#endif - -/* This just distinguishes between the different path formats on Windows and Unix: - * - on Windows you use a backslash '\' do separate directories - * - in Unix you use a slash '/' to separate directories - */ -#ifdef __WINDOWS__ - /** \brief a separator between two directories in a path between \c " quotes */ - #define JKQTPPATHSEPARATOR_STRING "\\" - /** \brief a separator between two directories in a path between \c ' quotes */ - #define JKQTPPATHSEPARATOR_CHAR '\\' - #include - #include -#else - /** \brief a separator between two directories in a path between \c " quotes */ - #define JKQTPPATHSEPARATOR_STRING "/" - /** \brief a separator between two directories in a path between \c ' quotes */ - #define JKQTPPATHSEPARATOR_CHAR '/' - #include - #include -#endif class JKQTPEnhancedPainter; // forward -class JKQtBasePlotter; // forward declaration +class JKQTBasePlotter; // forward declaration -/** \brief smallest linewidth any line in JKQtPlotter may have +/** \brief smallest linewidth any line in JKQTPLotter may have * \ingroup jkqtptools */ #define JKQTPLOTTER_ABS_MIN_LINEWIDTH 0.02 @@ -121,28 +96,28 @@ inline T JKQTPIsOKFloat(T v) { /** \brief converts a QT::PenStyle into a string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTP_QPenStyle2String(Qt::PenStyle style); +LIB_EXPORT QString jkqtp_QPenStyle2String(Qt::PenStyle style); /** \brief converts a QString into a Qt::PenStyle * \ingroup jkqtptools */ -LIB_EXPORT Qt::PenStyle JKQTP_String2QPenStyle(QString style); +LIB_EXPORT Qt::PenStyle jkqtp_String2QPenStyle(QString style); /** \brief converts a QT::BrushStyle into a string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTP_QBrushStyle2String(Qt::BrushStyle style); +LIB_EXPORT QString jkqtp_QBrushStyle2String(Qt::BrushStyle style); /** \brief converts a QString into a Qt::BrushStyle * \ingroup jkqtptools */ -LIB_EXPORT Qt::BrushStyle JKQTP_String2QBrushStyle(QString style); +LIB_EXPORT Qt::BrushStyle jkqtp_String2QBrushStyle(QString style); /** \brief display mode for an axis * \ingroup jkqtptools */ -enum JKQTPCAdrawMode { +enum JKQTPCADrawMode { JKQTPCADMcomplete=0, /*!< \brief draw axis with ticks, ticklabels and axis label */ JKQTPCADMticksAndLabels, /*!< \brief draw axis with ticks and tick labels */ JKQTPCADMticks, /*!< \brief draw axis with ticks */ @@ -150,20 +125,20 @@ enum JKQTPCAdrawMode { JKQTPCADMnone /*!< \brief draw no axis */ }; -/** \brief converts a JKQTPCAdrawMode variable into a human-readable string +/** \brief converts a JKQTPCADrawMode variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPCAdrawMode2String(JKQTPCAdrawMode pos); +LIB_EXPORT QString JKQTPCADrawMode2String(JKQTPCADrawMode pos); -/** \brief converts a string into a JKQTPCAdrawMode +/** \brief converts a string into a JKQTPCADrawMode * \ingroup jkqtptools */ -LIB_EXPORT JKQTPCAdrawMode String2JKQTPCAdrawMode(QString pos); +LIB_EXPORT JKQTPCADrawMode String2JKQTPCADrawMode(QString pos); /** \brief display mode for the axis labels * \ingroup jkqtptools */ -enum JKQTPCAlabelType { +enum JKQTPCALabelType { JKQTPCALTdefault, /*!< \brief simply print the numbers */ JKQTPCALTexponentCharacter, /*!< \brief print the numbers and show a unit character, i.e. \c 5µ for \f$ 5\cdot 10^{-6} \f$ , \cd 3k for \f$ 3\cdot 10^3 \f$ ... */ JKQTPCALTexponent, /*!< \brief show numbers in exponential for, e.g. \f$ 3\cdot 10^5 \f$ ... */ @@ -193,108 +168,101 @@ LIB_EXPORT QString JKQTPLabelTickMode2String(JKQTPLabelTickMode pos); LIB_EXPORT JKQTPLabelTickMode String2JKQTPLabelTickMode(QString pos); -/** \brief converts a JKQTPCAlabelType variable into a human-readable string +/** \brief converts a JKQTPCALabelType variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPCAlabelType2String(JKQTPCAlabelType pos); +LIB_EXPORT QString JKQTPCALabelType2String(JKQTPCALabelType pos); -/** \brief converts a string into a JKQTPCAlabelType +/** \brief converts a string into a JKQTPCALabelType * \ingroup jkqtptools */ -LIB_EXPORT JKQTPCAlabelType String2JKQTPCAlabelType(QString pos); +LIB_EXPORT JKQTPCALabelType String2JKQTPCALabelType(QString pos); /** \brief position of the axis labels * \ingroup jkqtptools */ -enum JKQTPlabelPosition { - JKQTPlabelMin=0, /*!< \brief the axis label is near the min value of the axis (left/bottom) */ - JKQTPlabelMax, /*!< \brief the axis label is near the max value of the axis (right/top) */ - JKQTPlabelCenter /*!< \brief the label is at the center of the axis */ +enum JKQTPLabelPosition { + JKQTPLabelMin=0, /*!< \brief the axis label is near the min value of the axis (left/bottom) */ + JKQTPLabelMax, /*!< \brief the axis label is near the max value of the axis (right/top) */ + JKQTPLabelCenter /*!< \brief the label is at the center of the axis */ }; -/** \brief converts a JKQTPlabelPosition variable into a human-readable string +/** \brief converts a JKQTPLabelPosition variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPlabelPosition2String(JKQTPlabelPosition pos); +LIB_EXPORT QString JKQTPLabelPosition2String(JKQTPLabelPosition pos); -/** \brief converts a string into a JKQTPlabelPosition +/** \brief converts a string into a JKQTPLabelPosition * \ingroup jkqtptools */ -LIB_EXPORT JKQTPlabelPosition String2JKQTPlabelPosition(QString pos); +LIB_EXPORT JKQTPLabelPosition String2JKQTPLabelPosition(QString pos); /** \brief position of the key * \ingroup jkqtptools */ -enum JKQTPkeyPosition { - JKQTPkeyOutsideTopRight=0, /*!< \brief the key is positioned on the right side of the graph */ - JKQTPkeyOutsideTopLeft, /*!< \brief the key is positioned on the left side of the graph */ - JKQTPkeyOutsideLeftTop, /*!< \brief the key is positioned above the graph */ - JKQTPkeyOutsideLeftBottom, /*!< \brief the key is positioned below the graph */ - JKQTPkeyOutsideRightBottom, /*!< \brief the key is positioned on the right side of the graph */ - JKQTPkeyOutsideRightTop, /*!< \brief the key is positioned on the left side of the graph */ - JKQTPkeyOutsideBottomLeft, /*!< \brief the key is positioned above the graph */ - JKQTPkeyOutsideBottomRight, /*!< \brief the key is positioned below the graph */ - JKQTPkeyInsideTopRight, /*!< \brief the key is positioned inside on the right side of the graph, but inside the graph*/ - JKQTPkeyInsideTopLeft, /*!< \brief the key is positioned inside on the left side of the graph */ - JKQTPkeyInsideBottomLeft, /*!< \brief the key is positioned inside on the upper bound of the graph */ - JKQTPkeyInsideBottomRight /*!< \brief the key is positioned inside on the lower bound of the graph */ +enum JKQTPKeyPosition { + JKQTPKeyOutsideTopRight=0, /*!< \brief the key is positioned on the right side of the graph */ + JKQTPKeyOutsideTopLeft, /*!< \brief the key is positioned on the left side of the graph */ + JKQTPKeyOutsideLeftTop, /*!< \brief the key is positioned above the graph */ + JKQTPKeyOutsideLeftBottom, /*!< \brief the key is positioned below the graph */ + JKQTPKeyOutsideRightBottom, /*!< \brief the key is positioned on the right side of the graph */ + JKQTPKeyOutsideRightTop, /*!< \brief the key is positioned on the left side of the graph */ + JKQTPKeyOutsideBottomLeft, /*!< \brief the key is positioned above the graph */ + JKQTPKeyOutsideBottomRight, /*!< \brief the key is positioned below the graph */ + JKQTPKeyInsideTopRight, /*!< \brief the key is positioned inside on the right side of the graph, but inside the graph*/ + JKQTPKeyInsideTopLeft, /*!< \brief the key is positioned inside on the left side of the graph */ + JKQTPKeyInsideBottomLeft, /*!< \brief the key is positioned inside on the upper bound of the graph */ + JKQTPKeyInsideBottomRight /*!< \brief the key is positioned inside on the lower bound of the graph */ }; -/** \brief converts a JKQTPlabelPosition variable into a human-readable string +/** \brief converts a JKQTPLabelPosition variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPkeyPosition2String(JKQTPkeyPosition pos); +LIB_EXPORT QString JKQTPKeyPosition2String(JKQTPKeyPosition pos); -/** \brief converts a string into a JKQTPlabelPosition +/** \brief converts a string into a JKQTPLabelPosition * \ingroup jkqtptools */ -LIB_EXPORT JKQTPkeyPosition String2JKQTPkeyPosition(QString pos); +LIB_EXPORT JKQTPKeyPosition String2JKQTPKeyPosition(QString pos); /** \brief layout of the key * \ingroup jkqtptools */ -enum JKQTPkeyLayout { - JKQTPkeyLayoutOneColumn, /*!< \brief the key consists of one column */ - JKQTPkeyLayoutOneRow, /*!< \brief the key consists of one row */ - JKQTPkeyLayoutMultiColumn, /*!< \brief the key consists of multiple columns */ +enum JKQTPKeyLayout { + JKQTPKeyLayoutOneColumn, /*!< \brief the key consists of one column */ + JKQTPKeyLayoutOneRow, /*!< \brief the key consists of one row */ + JKQTPKeyLayoutMultiColumn, /*!< \brief the key consists of multiple columns */ }; -/** \brief converts a JKQTPkeyLayout variable into a human-readable string +/** \brief converts a JKQTPKeyLayout variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPkeyLayout2String(JKQTPkeyLayout pos); +LIB_EXPORT QString JKQTPKeyLayout2String(JKQTPKeyLayout pos); -/** \brief converts a String into a JKQTPkeyLayout +/** \brief converts a String into a JKQTPKeyLayout * \ingroup jkqtptools */ -LIB_EXPORT JKQTPkeyLayout String2JKQTPkeyLayout(QString pos); +LIB_EXPORT JKQTPKeyLayout String2JKQTPKeyLayout(QString pos); /** \brief used to represent the position of other graphs in \ref jkqtplotter_base_saveprint * \ingroup jkqtptools + * \internal */ -typedef struct { - size_t x; - size_t y; - JKQtBasePlotter* plotter; -} JKQTPgridPrintingItem; +struct JKQTPGridPrintingItem { + /** \brief logic x-position of a graph, relative to the current JKQtPlotter */ + int x; + /** \brief logic y-position of a graph, relative to the current JKQtPlotter */ + int y; + /** \brief JKQTBasePlotter */ + JKQTBasePlotter* plotter; +}; - - -/** - * \brief create a property variable and a default variable for it. Also creates a doxygen comment for the default variable - * \ingroup jkqtptools - */ -#define JKQTPPROPERTY(type,varname) \ - type varname; \ - /*! \brief default value for property property varname. \see varname for more information */ \ - type def_##varname; - /** * \brief saves the given property (for which also a def_property exists) into the given settings object * \ingroup jkqtptools @@ -312,92 +280,92 @@ typedef struct { /** \brief plot styles for the error information * \ingroup jkqtptools */ -enum JKQTPerrorPlotstyle { - JKQTPerrorEllipses=10, /*!< \brief an ellipse spanned by the errors */ - JKQTPerrorBoxes=9, /*!< \brief a box spanned by the errors */ - JKQTPerrorSimpleBarsPolygons=8, /*!< \brief simplified error barsand polygons for each data point */ - JKQTPerrorSimpleBarsLines=7, /*!< \brief simplified error bars and line for each data point */ - JKQTPerrorSimpleBars=6, /*!< \brief simplified error bars for each data point */ - JKQTPerrorLines=5, /*!< \brief a second and third graph line above and below the actual data which indicates the error value */ - JKQTPerrorBars=4, /*!< \brief error bars for each data point */ - JKQTPerrorPolygons=3, /*!< \brief line error lines, but with filled range in between */ - JKQTPerrorBarsLines=2, /*!< \brief error bars and lines for each data point */ - JKQTPerrorBarsPolygons=1, /*!< \brief error bars and polygons for each data point */ - JKQTPnoError=0 /*!< \brief don't show error information */ +enum JKQTPErrorPlotstyle { + JKQTPErrorEllipses=10, /*!< \brief an ellipse spanned by the errors */ + JKQTPErrorBoxes=9, /*!< \brief a box spanned by the errors */ + JKQTPErrorSimpleBarsPolygons=8, /*!< \brief simplified error barsand polygons for each data point */ + JKQTPErrorSimpleBarsLines=7, /*!< \brief simplified error bars and line for each data point */ + JKQTPErrorSimpleBars=6, /*!< \brief simplified error bars for each data point */ + JKQTPErrorLines=5, /*!< \brief a second and third graph line above and below the actual data which indicates the error value */ + JKQTPErrorBars=4, /*!< \brief error bars for each data point */ + JKQTPErrorPolygons=3, /*!< \brief line error lines, but with filled range in between */ + JKQTPErrorBarsLines=2, /*!< \brief error bars and lines for each data point */ + JKQTPErrorBarsPolygons=1, /*!< \brief error bars and polygons for each data point */ + JKQTPNoError=0 /*!< \brief don't show error information */ }; -/** \brief converts a JKQTPerrorPlotstyle variable into a human-readable string +/** \brief converts a JKQTPErrorPlotstyle variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPerrorPlotstyle2String(JKQTPerrorPlotstyle pos); +LIB_EXPORT QString JKQTPErrorPlotstyle2String(JKQTPErrorPlotstyle pos); -/** \brief converts a String into a JKQTPerrorPlotstyle +/** \brief converts a String into a JKQTPErrorPlotstyle * \ingroup jkqtptools */ -LIB_EXPORT JKQTPerrorPlotstyle String2JKQTPerrorPlotstyle(QString pos); +LIB_EXPORT JKQTPErrorPlotstyle String2JKQTPErrorPlotstyle(QString pos); /** \brief plot styles for a graph * \ingroup jkqtptools */ -enum JKQTPgraphPlotstyle { - JKQTPlines, /*!< \brief plot y=f(x), connect the datapoints by straight lines */ - JKQTPfilledCurveX, /*!< \brief plot y=f(x), as filled curve (filled until the y=0/x-axis) */ - JKQTPfilledCurveY, /*!< \brief plot x=f(y), as filled curve (filled until the x=0/y-axis) */ - JKQTPpoints, /*!< \brief plot y=f(x), plot each datapoint with a symbol */ - JKQTPlinesPoints, /*!< \brief plot y=f(x), plot each datapoint with a symbol and connect them by straight lines */ - JKQTPimpulsesHorizontal, /*!< \brief plot y=f(x), plot each datapoint as a line from (x,0) to (x,f(x)) */ - JKQTPimpulsesVertical, /*!< \brief plot x=f(y), plot each datapoint as a line from (0,f(x)) to (x,f(x)) */ - JKQTPstepsX, /*!< \brief plot y=f(x), as a step curve */ - JKQTPstepsY /*!< \brief plot x=f(y), as a step curve */ +enum JKQTPGraphPlotstyle { + JKQTPLines, /*!< \brief plot y=f(x), connect the datapoints by straight lines */ + JKQTPFilledCurveX, /*!< \brief plot y=f(x), as filled curve (filled until the y=0/x-axis) */ + JKQTPFilledCurveY, /*!< \brief plot x=f(y), as filled curve (filled until the x=0/y-axis) */ + JKQTPPoints, /*!< \brief plot y=f(x), plot each datapoint with a symbol */ + JKQTPLinesPoints, /*!< \brief plot y=f(x), plot each datapoint with a symbol and connect them by straight lines */ + JKQTPImpulsesHorizontal, /*!< \brief plot y=f(x), plot each datapoint as a line from (x,0) to (x,f(x)) */ + JKQTPImpulsesVertical, /*!< \brief plot x=f(y), plot each datapoint as a line from (0,f(x)) to (x,f(x)) */ + JKQTPStepsX, /*!< \brief plot y=f(x), as a step curve */ + JKQTPStepsY /*!< \brief plot x=f(y), as a step curve */ }; /** \brief symbols that can be used to plot a datapoint for a graph * \ingroup jkqtptools */ -enum JKQTPgraphSymbols { - JKQTPnoSymbol=0, /*!< \brief plots no symbol at all (usefull together with error bars) */ - JKQTPdot=1, /*!< \brief a small dot \image html symbols/symbol_symbol_dot.png */ - JKQTPcross=2, /*!< \brief a X cross \image html symbols/symbol_symbol_cross.png */ - JKQTPplus=3, /*!< \brief a + cross \image html symbols/symbol_symbol_plus.png */ - JKQTPcircle=4, /*!< \brief an unfilled circle \image html symbols/symbol_symbol_circle.png */ - JKQTPfilledCircle=5, /*!< \brief a filled circle \image html symbols/symbol_symbol_filled_circle.png */ - JKQTPrect=6, /*!< \brief an unfilled rectangle \image html symbols/symbol_symbol_rect.png */ - JKQTPfilledRect=7, /*!< \brief a filled rectangle \image html symbols/symbol_symbol_filled_rect.png */ - JKQTPtriangle=8, /*!< \brief an unfilled triangle (tip at top) \image html symbols/symbol_symbol_triangle.png */ - JKQTPfilledTriangle=9, /*!< \brief a filled triangle (tip at top) \image html symbols/symbol_symbol_filled_triangle.png */ - JKQTPdownTriangle=10, /*!< \brief an unfilled triangle (tip at bottom) \image html symbols/symbol_symbol_down_triangle.png */ - JKQTPfilledDownTriangle=11, /*!< \brief a filled triangle (tip at bottom) \image html symbols/symbol_symbol_filled_down_triangle.png */ - JKQTPdiamond=12, /*!< \brief an unfilled diamond \image html symbols/symbol_symbol_diamond.png */ - JKQTPfilledDiamond=13, /*!< \brief a filled diamond \image html symbols/symbol_symbol_filled_diamond.png */ +enum JKQTPGraphSymbols { + JKQTPNoSymbol=0, /*!< \brief plots no symbol at all (usefull together with error bars) */ + JKQTPDot=1, /*!< \brief a small dot \image html symbols/symbol_symbol_dot.png */ + JKQTPCross=2, /*!< \brief a X cross \image html symbols/symbol_symbol_cross.png */ + JKQTPPlus=3, /*!< \brief a + cross \image html symbols/symbol_symbol_plus.png */ + JKQTPCircle=4, /*!< \brief an unfilled circle \image html symbols/symbol_symbol_circle.png */ + JKQTPFilledCircle=5, /*!< \brief a filled circle \image html symbols/symbol_symbol_filled_circle.png */ + JKQTPRect=6, /*!< \brief an unfilled rectangle \image html symbols/symbol_symbol_rect.png */ + JKQTPFilledRect=7, /*!< \brief a filled rectangle \image html symbols/symbol_symbol_filled_rect.png */ + JKQTPTriangle=8, /*!< \brief an unfilled triangle (tip at top) \image html symbols/symbol_symbol_triangle.png */ + JKQTPFilledTriangle=9, /*!< \brief a filled triangle (tip at top) \image html symbols/symbol_symbol_filled_triangle.png */ + JKQTPDownTriangle=10, /*!< \brief an unfilled triangle (tip at bottom) \image html symbols/symbol_symbol_down_triangle.png */ + JKQTPFilledDownTriangle=11, /*!< \brief a filled triangle (tip at bottom) \image html symbols/symbol_symbol_filled_down_triangle.png */ + JKQTPDiamond=12, /*!< \brief an unfilled diamond \image html symbols/symbol_symbol_diamond.png */ + JKQTPFilledDiamond=13, /*!< \brief a filled diamond \image html symbols/symbol_symbol_filled_diamond.png */ JKQTPstar=14, /*!< \brief an unfilled diamond \image html symbols/symbol_symbol_star.png */ - JKQTPfilledStar=15, /*!< \brief a filled diamond \image html symbols/symbol_symbol_filled_star.png */ - JKQTPpentagon=16, /*!< \brief an unfilled pentagon \image html symbols/symbol_symbol_pentagon.png */ - JKQTPfilledPentagon=17, /*!< \brief a filled pentagon \image html symbols/symbol_symbol_filled_pentagon.png */ - JKQTPasterisc=18, /*!< \brief an asterisc star '*' \image html symbols/symbol_symbol_asterisc.png */ + JKQTPFilledStar=15, /*!< \brief a filled diamond \image html symbols/symbol_symbol_filled_star.png */ + JKQTPPentagon=16, /*!< \brief an unfilled pentagon \image html symbols/symbol_symbol_pentagon.png */ + JKQTPFilledPentagon=17, /*!< \brief a filled pentagon \image html symbols/symbol_symbol_filled_pentagon.png */ + JKQTPAsterisc=18, /*!< \brief an asterisc star '*' \image html symbols/symbol_symbol_asterisc.png */ - JKQTPtarget=19, /*!< \brief a target symbol (circle with cross) \image html symbols/symbol_symbol_target.png */ - JKQTPrectCross=20, /*!< \brief a square symbol with a cross inside \image html symbols/symbol_symbol_rect_cross.png */ - JKQTPrectPlus=21, /*!< \brief a square symbol with a plus inside \image html symbols/symbol_symbol_rect_plus.png */ + JKQTPTarget=19, /*!< \brief a target symbol (circle with cross) \image html symbols/symbol_symbol_target.png */ + JKQTPRectCross=20, /*!< \brief a square symbol with a cross inside \image html symbols/symbol_symbol_rect_cross.png */ + JKQTPRectPlus=21, /*!< \brief a square symbol with a plus inside \image html symbols/symbol_symbol_rect_plus.png */ - JKQTPmaxSymbolID=JKQTPrectPlus + JKQTPMaxSymbolID=JKQTPRectPlus }; -/** \brief converts a JKQTPgraphSymbols variable into a identifier string +/** \brief converts a JKQTPGraphSymbols variable into a identifier string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPgraphSymbols2String(JKQTPgraphSymbols pos); -/** \brief converts a JKQTPgraphSymbols variable into a human-readable string +LIB_EXPORT QString JKQTPGraphSymbols2String(JKQTPGraphSymbols pos); +/** \brief converts a JKQTPGraphSymbols variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPgraphSymbols2NameString(JKQTPgraphSymbols pos); +LIB_EXPORT QString JKQTPGraphSymbols2NameString(JKQTPGraphSymbols pos); -/** \brief converts a String into a JKQTPgraphSymbols +/** \brief converts a String into a JKQTPGraphSymbols * \ingroup jkqtptools */ -LIB_EXPORT JKQTPgraphSymbols String2JKQTPgraphSymbols(QString pos); +LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(QString pos); /** \brief convert a double to a string, using the loacle "C" @@ -609,7 +577,7 @@ LIB_EXPORT std::string jkqtp_rgbtostring(unsigned char r, unsigned char g, unsig * * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. */ -inline QString JKQTP_QColor2String(QColor color) { +inline QString jkqtp_QColor2String(QColor color) { return QString(jkqtp_rgbtostring(static_cast((color).red()), static_cast((color).green()), static_cast((color).blue()), static_cast((color).alpha())).c_str()); } @@ -660,21 +628,21 @@ inline constexpr double jkqtp_todouble(const bool& d) { /** \brief plot styles for the error information * \ingroup jkqtptools */ -enum JKQTPstepType { - JKQTPstepLeft=0, /*!< \brief datapoint is on the left edge of the hor. step line */ - JKQTPstepCenter=1, /*!< \brief datapoint is centered on the hor. step line */ - JKQTPstepRight=2, /*!< \brief datapoint is on the right edge of the hor. step line */ +enum JKQTPStepType { + JKQTPStepLeft=0, /*!< \brief datapoint is on the left edge of the hor. step line */ + JKQTPStepCenter=1, /*!< \brief datapoint is centered on the hor. step line */ + JKQTPStepRight=2, /*!< \brief datapoint is on the right edge of the hor. step line */ }; -/** \brief converts a JKQTPstepType variable into a human-readable string +/** \brief converts a JKQTPStepType variable into a human-readable string * \ingroup jkqtptools */ -LIB_EXPORT QString JKQTPstepType2String(JKQTPstepType pos); +LIB_EXPORT QString JKQTPStepType2String(JKQTPStepType pos); -/** \brief converts a String into a JKQTPstepType +/** \brief converts a String into a JKQTPStepType * \ingroup jkqtptools */ -LIB_EXPORT JKQTPstepType String2JKQTPstepType(QString pos); +LIB_EXPORT JKQTPStepType String2JKQTPStepType(QString pos); #endif // JKQTPTOOLS_H_INCLUDED diff --git a/screenshots/README.md b/screenshots/README.md index 846737313a..c38fb1deed 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -1,4 +1,4 @@ -# JKQTPlotter: Screenshots +# JKQTPLotter: Screenshots ## Scatter Plots and Boxplots ![Scatterplots](./screen_scatter.png) @@ -32,8 +32,8 @@ Scatter Plots can have symbols where the shape/color/size is parametrized by a d ## Barcharts -![JKQTPbarVerticalGraphStacked](../doc/images/JKQTPbarVerticalGraphStacked.png) -![JKQTPbarHorizontalGraphStacked](../doc/images/JKQTPbarHorizontalGraphStacked.png) +![JKQTPBarVerticalGraphStacked](../doc/images/JKQTPBarVerticalGraphStacked.png) +![JKQTPBarHorizontalGraphStacked](../doc/images/JKQTPBarHorizontalGraphStacked.png) ![jkqtplotter_simpletest_barchart](./jkqtplotter_simpletest_barchart.png) ## Screenshots of included LaTeX renderer @@ -46,7 +46,7 @@ Scatter Plots can have symbols where the shape/color/size is parametrized by a d ## QuickFit 3.0 Screenshots -The library JKQtPlotter was developed initially as a central part of the data evaluation software for biophysics [QuickFit 3.0](https://github.com/jkriege2/QuickFit3). The latter makes heavy use of `JKQtPlotter`, `JKQTmathText` and `JKQtFastPlotter`: +The library JKQTPLotter was developed initially as a central part of the data evaluation software for biophysics [QuickFit 3.0](https://github.com/jkriege2/QuickFit3). The latter makes heavy use of `JKQTPLotter`, `JKQTMathText` and `JKQTFastPlotter`: ![QuickFit 3.0 Screenshot](./QF3_screen_dcalc.png) ![QuickFit 3.0 Screenshot](./QF3_screen_fccsfit.png) diff --git a/sharedlib/README.md b/sharedlib/README.md index 3b7025710e..c42511b854 100644 --- a/sharedlib/README.md +++ b/sharedlib/README.md @@ -1,6 +1,6 @@ -# JKQtPlotter: Build as a SHARED library +# JKQTPLotter: Build as a SHARED library -This directory contains Projects that can be used to build a shared library of JKQtPlotter (i.e. the contents of the directory [`../lib`](../lib) +This directory contains Projects that can be used to build a shared library of JKQTPLotter (i.e. the contents of the directory [`../lib`](../lib) ## QMake @@ -8,7 +8,7 @@ This directory contains Projects that can be used to build a shared library of J There are several `.PRO`-files, that can be used to build the full library, or a limited subsets. They will produce a dynamic link library that you can include into your projects, e.g. with the following QMake-snippet: ```.qmake -# include JKQtPlotter library +# include JKQTPLotter library DEPENDPATH += /lib INCLUDEPATH += /lib CONFIG (debug, debug|release) { diff --git a/staticlib/README.md b/staticlib/README.md index 5f49a790bc..935de89b5b 100644 --- a/staticlib/README.md +++ b/staticlib/README.md @@ -1,6 +1,6 @@ -# JKQtPlotter: Build as a STATIC library +# JKQTPLotter: Build as a STATIC library -This directory contains Projects that can be used to build a static library of JKQtPlotter (i.e. the contents of the directory [`../lib`](../lib) +This directory contains Projects that can be used to build a static library of JKQTPLotter (i.e. the contents of the directory [`../lib`](../lib) ## QMake @@ -8,7 +8,7 @@ This directory contains Projects that can be used to build a static library of J There are several `.PRO`-files, that can be used to build the full library, or a limited subsets. They will produce a static link libraries that you can include into your projects, e.g. with the following QMake-snippet: ```.qmake -# include JKQtPlotter library +# include JKQTPLotter library DEPENDPATH += /lib INCLUDEPATH += /lib CONFIG (debug, debug|release) {