diff --git a/examples/advplotstyling/advplotstyling.cpp b/examples/advplotstyling/advplotstyling.cpp index d64542da54..410fa5b5a0 100644 --- a/examples/advplotstyling/advplotstyling.cpp +++ b/examples/advplotstyling/advplotstyling.cpp @@ -13,8 +13,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/barchart/barchart.cpp b/examples/barchart/barchart.cpp index 4ab917a1ff..79d9698ce6 100644 --- a/examples/barchart/barchart.cpp +++ b/examples/barchart/barchart.cpp @@ -102,8 +102,14 @@ void doExample() int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + doExample(); doExample(); diff --git a/examples/boxplot/boxplot.cpp b/examples/boxplot/boxplot.cpp index 27e39ad009..bc49a8d138 100644 --- a/examples/boxplot/boxplot.cpp +++ b/examples/boxplot/boxplot.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/contourplot/contourplot.cpp b/examples/contourplot/contourplot.cpp index 59a53437d1..0334927733 100644 --- a/examples/contourplot/contourplot.cpp +++ b/examples/contourplot/contourplot.cpp @@ -19,9 +19,15 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/datastore/datastore.cpp b/examples/datastore/datastore.cpp index 4bb7ef00ee..8397187b21 100644 --- a/examples/datastore/datastore.cpp +++ b/examples/datastore/datastore.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; JKQTPDatastore* datastore=plot.getDatastore(); diff --git a/examples/datastore_groupedstat/datastore_groupedstat.cpp b/examples/datastore_groupedstat/datastore_groupedstat.cpp index ee23aca078..dfc5ff73b8 100644 --- a/examples/datastore_groupedstat/datastore_groupedstat.cpp +++ b/examples/datastore_groupedstat/datastore_groupedstat.cpp @@ -18,9 +18,15 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) QWidget mainWidget; QGridLayout* lay; diff --git a/examples/datastore_iterators/datastore_iterators.cpp b/examples/datastore_iterators/datastore_iterators.cpp index dad883153f..9df46f70e2 100644 --- a/examples/datastore_iterators/datastore_iterators.cpp +++ b/examples/datastore_iterators/datastore_iterators.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; JKQTPDatastore* datastore=plot.getDatastore(); diff --git a/examples/datastore_regression/datastore_regression.cpp b/examples/datastore_regression/datastore_regression.cpp index 4dd9f88ff2..3e3d07c369 100644 --- a/examples/datastore_regression/datastore_regression.cpp +++ b/examples/datastore_regression/datastore_regression.cpp @@ -18,9 +18,15 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) QWidget mainWidget; QGridLayout* lay; diff --git a/examples/datastore_statistics/datastore_statistics.cpp b/examples/datastore_statistics/datastore_statistics.cpp index b55d7dcb17..3d7e6dd8bc 100644 --- a/examples/datastore_statistics/datastore_statistics.cpp +++ b/examples/datastore_statistics/datastore_statistics.cpp @@ -18,9 +18,15 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) QWidget mainWidget; QGridLayout* lay; diff --git a/examples/datastore_statistics_2d/datastore_statistics_2d.cpp b/examples/datastore_statistics_2d/datastore_statistics_2d.cpp index 60bc85f22f..e2a80c75cf 100644 --- a/examples/datastore_statistics_2d/datastore_statistics_2d.cpp +++ b/examples/datastore_statistics_2d/datastore_statistics_2d.cpp @@ -18,7 +18,13 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + QElapsedTimer timer; diff --git a/examples/dateaxes/dateaxes.cpp b/examples/dateaxes/dateaxes.cpp index 588fdce861..8509af9c6a 100644 --- a/examples/dateaxes/dateaxes.cpp +++ b/examples/dateaxes/dateaxes.cpp @@ -168,7 +168,13 @@ void drawWithTimeAxis(JKQTPlotter& plot) { int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plotDate; drawWithDateAxis(plotDate); plotDate.move(100,100); diff --git a/examples/distributionplot/test_distributionplot.cpp b/examples/distributionplot/test_distributionplot.cpp index 67ea1a671b..e955830088 100644 --- a/examples/distributionplot/test_distributionplot.cpp +++ b/examples/distributionplot/test_distributionplot.cpp @@ -17,8 +17,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/errorbarstyles/errorbarstyles.cpp b/examples/errorbarstyles/errorbarstyles.cpp index 848bf3bd14..718dcbbe8a 100644 --- a/examples/errorbarstyles/errorbarstyles.cpp +++ b/examples/errorbarstyles/errorbarstyles.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/evalcurve/evalcurve.cpp b/examples/evalcurve/evalcurve.cpp index c22db16202..2704d23461 100644 --- a/examples/evalcurve/evalcurve.cpp +++ b/examples/evalcurve/evalcurve.cpp @@ -13,8 +13,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a window that contains a line-edit to edit a function // and a JKQTPlotter to display the function, combine everything in a layout QWidget mainWin; diff --git a/examples/filledgraphs/filledgraphs.cpp b/examples/filledgraphs/filledgraphs.cpp index 96b90bec65..3664e484bc 100644 --- a/examples/filledgraphs/filledgraphs.cpp +++ b/examples/filledgraphs/filledgraphs.cpp @@ -10,8 +10,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/functionplot/functionplot.cpp b/examples/functionplot/functionplot.cpp index 7698c8a1c3..c1a5972f35 100644 --- a/examples/functionplot/functionplot.cpp +++ b/examples/functionplot/functionplot.cpp @@ -134,8 +134,14 @@ void drawExample(QApplication& app, const QString& name) { int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + drawExample(app, "functionplot: JKQTPXFunctionLineGraph"); drawExample(app, "functionplot: JKQTPYFunctionLineGraph"); diff --git a/examples/geo_arrows/geo_arrows.cpp b/examples/geo_arrows/geo_arrows.cpp index f03d712352..855991ed85 100644 --- a/examples/geo_arrows/geo_arrows.cpp +++ b/examples/geo_arrows/geo_arrows.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window JKQTPlotter plot; diff --git a/examples/geo_simple/geo_simple.cpp b/examples/geo_simple/geo_simple.cpp index 5768deddd4..7b320de627 100644 --- a/examples/geo_simple/geo_simple.cpp +++ b/examples/geo_simple/geo_simple.cpp @@ -84,8 +84,14 @@ void drawEllExample(JKQTPlotter* plot, double x0, double y0, double wid, double int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a Widget with a plotter and some control-elements QWidget widMain; QGridLayout* layMain=new QGridLayout; diff --git a/examples/geometric/geometric.cpp b/examples/geometric/geometric.cpp index a8d0b59824..8cc436ced4 100644 --- a/examples/geometric/geometric.cpp +++ b/examples/geometric/geometric.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a Widget with a plotter and some control-elements QWidget widMain; QGridLayout* layMain=new QGridLayout; diff --git a/examples/imageplot/imageplot.cpp b/examples/imageplot/imageplot.cpp index 316a6c7a99..b2a161edbf 100644 --- a/examples/imageplot/imageplot.cpp +++ b/examples/imageplot/imageplot.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/imageplot_modifier/imageplot_modifier.cpp b/examples/imageplot_modifier/imageplot_modifier.cpp index 300fceacc0..8a0b046466 100644 --- a/examples/imageplot_modifier/imageplot_modifier.cpp +++ b/examples/imageplot_modifier/imageplot_modifier.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/imageplot_nodatastore/imageplot_nodatastore.cpp b/examples/imageplot_nodatastore/imageplot_nodatastore.cpp index e37e3c4069..a059204a42 100644 --- a/examples/imageplot_nodatastore/imageplot_nodatastore.cpp +++ b/examples/imageplot_nodatastore/imageplot_nodatastore.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/imageplot_userpal/imageplot_userpal.cpp b/examples/imageplot_userpal/imageplot_userpal.cpp index 85057dd361..c95b7503cd 100644 --- a/examples/imageplot_userpal/imageplot_userpal.cpp +++ b/examples/imageplot_userpal/imageplot_userpal.cpp @@ -17,8 +17,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 0. tell the library where to find additional palettes. // this needs to be done BEFORE first using JKQTPlotter // 0.1 first we want to build a user-defined palette with five colors diff --git a/examples/impulsesplot/impulsesplot.cpp b/examples/impulsesplot/impulsesplot.cpp index ca079c182f..40595d22f2 100644 --- a/examples/impulsesplot/impulsesplot.cpp +++ b/examples/impulsesplot/impulsesplot.cpp @@ -13,8 +13,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp index 211ac451f5..c4bde330aa 100644 --- a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // we use a simple label to display the math text QLabel lab; diff --git a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp index 97970aaa3b..a2032e8523 100644 --- a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp +++ b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp @@ -3,8 +3,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + TestForm w; w.show(); w.updateMath(); diff --git a/examples/jkqtplot_test/jkqtplot_test.cpp b/examples/jkqtplot_test/jkqtplot_test.cpp index 3d940844fd..6301ad2c7a 100644 --- a/examples/jkqtplot_test/jkqtplot_test.cpp +++ b/examples/jkqtplot_test/jkqtplot_test.cpp @@ -5,8 +5,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + TestMain tab; tab.show(); diff --git a/examples/logaxes/logaxes.cpp b/examples/logaxes/logaxes.cpp index 90ed37a8a5..22853f2029 100644 --- a/examples/logaxes/logaxes.cpp +++ b/examples/logaxes/logaxes.cpp @@ -14,8 +14,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/mandelbrot/mandelbrot.cpp b/examples/mandelbrot/mandelbrot.cpp index 191027258a..ad0cf6b922 100644 --- a/examples/mandelbrot/mandelbrot.cpp +++ b/examples/mandelbrot/mandelbrot.cpp @@ -12,7 +12,13 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + MandelbrotMainWindow widMain; widMain.show(); diff --git a/examples/multiplot/test_multiplot.cpp b/examples/multiplot/test_multiplot.cpp index 8a7e9fbbda..70561e3748 100644 --- a/examples/multiplot/test_multiplot.cpp +++ b/examples/multiplot/test_multiplot.cpp @@ -15,8 +15,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a widget QWidget mainWidget; mainWidget.setWindowTitle("JKQTPlotter(s) in a QGridLayout"); diff --git a/examples/parametriccurve/parametriccurve.cpp b/examples/parametriccurve/parametriccurve.cpp index 915f434765..bfd1204a7a 100644 --- a/examples/parametriccurve/parametriccurve.cpp +++ b/examples/parametriccurve/parametriccurve.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create two plotter windows that share the same internal datastore (for convenience) JKQTPlotter plot, plot2; JKQTPDatastore* ds=plot.getDatastore(); diff --git a/examples/paramscatterplot/paramscatterplot.cpp b/examples/paramscatterplot/paramscatterplot.cpp index c2628c9429..a8ab58efe6 100644 --- a/examples/paramscatterplot/paramscatterplot.cpp +++ b/examples/paramscatterplot/paramscatterplot.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/paramscatterplot_image/paramscatterplot_image.cpp b/examples/paramscatterplot_image/paramscatterplot_image.cpp index cca6471b0f..836df15414 100644 --- a/examples/paramscatterplot_image/paramscatterplot_image.cpp +++ b/examples/paramscatterplot_image/paramscatterplot_image.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/parsedfunctionplot/parsedfunctionplot.cpp b/examples/parsedfunctionplot/parsedfunctionplot.cpp index 4023495f86..68a2284508 100644 --- a/examples/parsedfunctionplot/parsedfunctionplot.cpp +++ b/examples/parsedfunctionplot/parsedfunctionplot.cpp @@ -17,8 +17,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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 QWidget mainWin; diff --git a/examples/rgbimageplot/rgbimageplot.cpp b/examples/rgbimageplot/rgbimageplot.cpp index 1ecc30202b..421351b635 100644 --- a/examples/rgbimageplot/rgbimageplot.cpp +++ b/examples/rgbimageplot/rgbimageplot.cpp @@ -13,8 +13,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/rgbimageplot_qt/rgbimageplot_qt.cpp b/examples/rgbimageplot_qt/rgbimageplot_qt.cpp index a8c9450afa..9acafffde1 100644 --- a/examples/rgbimageplot_qt/rgbimageplot_qt.cpp +++ b/examples/rgbimageplot_qt/rgbimageplot_qt.cpp @@ -14,8 +14,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plot; diff --git a/examples/simpletest/simpletest.cpp b/examples/simpletest/simpletest.cpp index 808299b393..1ca6af385b 100644 --- a/examples/simpletest/simpletest.cpp +++ b/examples/simpletest/simpletest.cpp @@ -11,8 +11,20 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif + + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); @@ -47,6 +59,7 @@ int main(int argc, char* argv[]) plot.zoomToFit(); // show plotter and make it a decent size + plot.getPlotter()->setPlotLabel(QObject::tr("Graph Title")); plot.show(); plot.resize(600,400); diff --git a/examples/speed/speed.cpp b/examples/speed/speed.cpp index 7d8ecae83a..6ea8023afe 100644 --- a/examples/speed/speed.cpp +++ b/examples/speed/speed.cpp @@ -7,8 +7,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) SpeedTestPlot plot; diff --git a/examples/stackedbars/stackedbars.cpp b/examples/stackedbars/stackedbars.cpp index 920933c9e7..a343d28b9c 100644 --- a/examples/stackedbars/stackedbars.cpp +++ b/examples/stackedbars/stackedbars.cpp @@ -102,8 +102,14 @@ void addGraph(JKQTPlotter& plot, bool swapXY) { int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + JKQTPlotter plotV; addGraph(plotV, false); plotV.setWindowTitle("JKQTPBarVerticalStackableGraph"); diff --git a/examples/stepplots/stepplots.cpp b/examples/stepplots/stepplots.cpp index 4eecd0c0ca..a86d82d508 100644 --- a/examples/stepplots/stepplots.cpp +++ b/examples/stepplots/stepplots.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/styledboxplot/test_styledboxplot.cpp b/examples/styledboxplot/test_styledboxplot.cpp index 39a7d05188..433236978e 100644 --- a/examples/styledboxplot/test_styledboxplot.cpp +++ b/examples/styledboxplot/test_styledboxplot.cpp @@ -11,8 +11,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting diff --git a/examples/styling/test_styling_main.cpp b/examples/styling/test_styling_main.cpp index ffb1a580f6..0a5c6beb30 100644 --- a/examples/styling/test_styling_main.cpp +++ b/examples/styling/test_styling_main.cpp @@ -5,8 +5,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + // you can set the system-wide default style properties early on // all JKQTPlotter instance created after this, will use these // settings as their initial settings diff --git a/examples/symbols_and_errors/symbols_and_errors.cpp b/examples/symbols_and_errors/symbols_and_errors.cpp index 0ad4c5b392..a9c4548b35 100644 --- a/examples/symbols_and_errors/symbols_and_errors.cpp +++ b/examples/symbols_and_errors/symbols_and_errors.cpp @@ -13,8 +13,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/symbols_and_styles/symbols_and_styles.cpp b/examples/symbols_and_styles/symbols_and_styles.cpp index e2f8833167..c2574323d5 100644 --- a/examples/symbols_and_styles/symbols_and_styles.cpp +++ b/examples/symbols_and_styles/symbols_and_styles.cpp @@ -12,8 +12,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif 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(); diff --git a/examples/ui/ui.cpp b/examples/ui/ui.cpp index ff26f6652a..c39fa12c82 100644 --- a/examples/ui/ui.cpp +++ b/examples/ui/ui.cpp @@ -4,8 +4,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + FormWithJKQTPlotter plot; plot.show(); plot.resize(600,400); diff --git a/examples/user_interaction/test_user_interaction_main.cpp b/examples/user_interaction/test_user_interaction_main.cpp index 5fb5df82c2..25a6493ddc 100644 --- a/examples/user_interaction/test_user_interaction_main.cpp +++ b/examples/user_interaction/test_user_interaction_main.cpp @@ -4,8 +4,14 @@ int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + TestUserInteraction win; win.show(); diff --git a/examples/violinplot/violinplot.cpp b/examples/violinplot/violinplot.cpp index e778d35703..25aabd9321 100644 --- a/examples/violinplot/violinplot.cpp +++ b/examples/violinplot/violinplot.cpp @@ -163,8 +163,14 @@ JKQTPlotter* showPlot() { int main(int argc, char* argv[]) { + +#if QT_VERSION >= 0x050600 + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps +#endif QApplication app(argc, argv); + showPlot(); showPlot();