mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-24 17:41:39 +08:00
activated high-dpi scaling for all JKQtPlotter examples
This commit is contained in:
parent
8f184791cc
commit
098bcf9c8b
@ -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();
|
||||||
|
@ -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>();
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
@ -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();
|
||||||
|
@ -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");
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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");
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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");
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user