activated high-dpi scaling for all JKQtPlotter examples

This commit is contained in:
jkriege2 2022-04-15 23:01:09 +02:00
parent 8f184791cc
commit 098bcf9c8b
47 changed files with 289 additions and 0 deletions

View File

@ -13,8 +13,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -102,8 +102,14 @@ void doExample()
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
doExample<JKQTPBarVerticalGraph>(); doExample<JKQTPBarVerticalGraph>();
doExample<JKQTPBarHorizontalGraph>(); doExample<JKQTPBarHorizontalGraph>();

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -19,9 +19,15 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* datastore=plot.getDatastore(); JKQTPDatastore* datastore=plot.getDatastore();

View File

@ -18,9 +18,15 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience)
QWidget mainWidget; QWidget mainWidget;
QGridLayout* lay; QGridLayout* lay;

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* datastore=plot.getDatastore(); JKQTPDatastore* datastore=plot.getDatastore();

View File

@ -18,9 +18,15 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience)
QWidget mainWidget; QWidget mainWidget;
QGridLayout* lay; QGridLayout* lay;

View File

@ -18,9 +18,15 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a window with several plotters and get a pointer to the internal datastores (for convenience) // 1. create a window with several plotters and get a pointer to the internal datastores (for convenience)
QWidget mainWidget; QWidget mainWidget;
QGridLayout* lay; QGridLayout* lay;

View File

@ -18,7 +18,13 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
QElapsedTimer timer; QElapsedTimer timer;

View File

@ -168,7 +168,13 @@ void drawWithTimeAxis(JKQTPlotter& plot) {
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plotDate; JKQTPlotter plotDate;
drawWithDateAxis(plotDate); drawWithDateAxis(plotDate);
plotDate.move(100,100); plotDate.move(100,100);

View File

@ -17,8 +17,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -13,8 +13,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a window that contains a line-edit to edit a function // 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 // and a JKQTPlotter to display the function, combine everything in a layout
QWidget mainWin; QWidget mainWin;

View File

@ -10,8 +10,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -134,8 +134,14 @@ void drawExample(QApplication& app, const QString& name) {
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
drawExample<JKQTPXFunctionLineGraph>(app, "functionplot: JKQTPXFunctionLineGraph"); drawExample<JKQTPXFunctionLineGraph>(app, "functionplot: JKQTPXFunctionLineGraph");
drawExample<JKQTPYFunctionLineGraph>(app, "functionplot: JKQTPYFunctionLineGraph"); drawExample<JKQTPYFunctionLineGraph>(app, "functionplot: JKQTPYFunctionLineGraph");

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window // 1. create a plotter window
JKQTPlotter plot; JKQTPlotter plot;

View File

@ -84,8 +84,14 @@ void drawEllExample(JKQTPlotter* plot, double x0, double y0, double wid, double
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a Widget with a plotter and some control-elements // 1. create a Widget with a plotter and some control-elements
QWidget widMain; QWidget widMain;
QGridLayout* layMain=new QGridLayout; QGridLayout* layMain=new QGridLayout;

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a Widget with a plotter and some control-elements // 1. create a Widget with a plotter and some control-elements
QWidget widMain; QWidget widMain;
QGridLayout* layMain=new QGridLayout; QGridLayout* layMain=new QGridLayout;

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plot; JKQTPlotter plot;
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plot; JKQTPlotter plot;
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plot; JKQTPlotter plot;
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -17,8 +17,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 0. tell the library where to find additional palettes. // 0. tell the library where to find additional palettes.
// this needs to be done BEFORE first using JKQTPlotter // this needs to be done BEFORE first using JKQTPlotter
// 0.1 first we want to build a user-defined palette with five colors // 0.1 first we want to build a user-defined palette with five colors

View File

@ -13,8 +13,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// we use a simple label to display the math text // we use a simple label to display the math text
QLabel lab; QLabel lab;

View File

@ -3,8 +3,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
TestForm w; TestForm w;
w.show(); w.show();
w.updateMath(); w.updateMath();

View File

@ -5,8 +5,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
TestMain tab; TestMain tab;
tab.show(); tab.show();

View File

@ -14,8 +14,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -12,7 +12,13 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
MandelbrotMainWindow widMain; MandelbrotMainWindow widMain;
widMain.show(); widMain.show();

View File

@ -15,8 +15,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a widget // 1. create a widget
QWidget mainWidget; QWidget mainWidget;
mainWidget.setWindowTitle("JKQTPlotter(s) in a QGridLayout"); mainWidget.setWindowTitle("JKQTPlotter(s) in a QGridLayout");

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create two plotter windows that share the same internal datastore (for convenience) // 1. create two plotter windows that share the same internal datastore (for convenience)
JKQTPlotter plot, plot2; JKQTPlotter plot, plot2;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -17,8 +17,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a window that conatins a line-edit to edit a function // 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; QWidget mainWin;

View File

@ -13,8 +13,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plot; JKQTPlotter plot;
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -14,8 +14,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plot; JKQTPlotter plot;

View File

@ -11,8 +11,20 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();
@ -47,6 +59,7 @@ int main(int argc, char* argv[])
plot.zoomToFit(); plot.zoomToFit();
// show plotter and make it a decent size // show plotter and make it a decent size
plot.getPlotter()->setPlotLabel(QObject::tr("Graph Title"));
plot.show(); plot.show();
plot.resize(600,400); plot.resize(600,400);

View File

@ -7,8 +7,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
SpeedTestPlot plot; SpeedTestPlot plot;

View File

@ -102,8 +102,14 @@ void addGraph(JKQTPlotter& plot, bool swapXY) {
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
JKQTPlotter plotV; JKQTPlotter plotV;
addGraph<JKQTPBarVerticalStackableGraph>(plotV, false); addGraph<JKQTPBarVerticalStackableGraph>(plotV, false);
plotV.setWindowTitle("JKQTPBarVerticalStackableGraph"); plotV.setWindowTitle("JKQTPBarVerticalStackableGraph");

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -11,8 +11,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting

View File

@ -5,8 +5,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// you can set the system-wide default style properties early on // you can set the system-wide default style properties early on
// all JKQTPlotter instance created after this, will use these // all JKQTPlotter instance created after this, will use these
// settings as their initial settings // settings as their initial settings

View File

@ -13,8 +13,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -12,8 +12,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience) // 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot; JKQTPlotter plot;
JKQTPDatastore* ds=plot.getDatastore(); JKQTPDatastore* ds=plot.getDatastore();

View File

@ -4,8 +4,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
FormWithJKQTPlotter plot; FormWithJKQTPlotter plot;
plot.show(); plot.show();
plot.resize(600,400); plot.resize(600,400);

View File

@ -4,8 +4,14 @@
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
TestUserInteraction win; TestUserInteraction win;
win.show(); win.show();

View File

@ -163,8 +163,14 @@ JKQTPlotter* showPlot() {
int main(int argc, char* argv[]) 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); QApplication app(argc, argv);
showPlot<JKQTPViolinplotHorizontalElement,JKQTPSingleColumnSymbolsGraph::DataDirection::X>(); showPlot<JKQTPViolinplotHorizontalElement,JKQTPSingleColumnSymbolsGraph::DataDirection::X>();
showPlot<JKQTPViolinplotVerticalElement,JKQTPSingleColumnSymbolsGraph::DataDirection::Y>(); showPlot<JKQTPViolinplotVerticalElement,JKQTPSingleColumnSymbolsGraph::DataDirection::Y>();