2022-08-26 18:31:27 +08:00
|
|
|
#pragma once
|
|
|
|
#include <QApplication>
|
|
|
|
#include "jkqtplotter/jkqtplotter.h"
|
2022-08-27 03:23:19 +08:00
|
|
|
#include "jkqtpappsettingcontroller.h"
|
2022-08-26 18:31:27 +08:00
|
|
|
#include <QDir>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class JKQTPExampleApplication: public QApplication {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-08-29 04:48:14 +08:00
|
|
|
JKQTPExampleApplication(int &argc, char **argv, bool waitForScreenshotReady=false);
|
2022-08-26 18:31:27 +08:00
|
|
|
|
|
|
|
virtual ~JKQTPExampleApplication();
|
|
|
|
|
|
|
|
int exec();
|
2022-08-29 04:48:14 +08:00
|
|
|
public slots:
|
|
|
|
void notifyReadyForScreenshot();
|
2022-08-26 18:31:27 +08:00
|
|
|
protected:
|
2022-08-29 04:48:14 +08:00
|
|
|
bool waitForScreenshotReady;
|
|
|
|
bool readyForScreenshot;
|
2022-08-26 18:31:27 +08:00
|
|
|
QDir screenshotDir;
|
|
|
|
bool saveScreenshot;
|
|
|
|
bool saveSmallScreenshot;
|
|
|
|
bool saveScreenshotPlot;
|
|
|
|
bool saveSmallScreenshotPlot;
|
2022-08-27 03:23:19 +08:00
|
|
|
bool scaleDownFromHighDPI;
|
|
|
|
QStringList screenshotBasename;
|
2022-08-26 18:31:27 +08:00
|
|
|
void readCmdLine();
|
|
|
|
QRect getBoundsWithoutColor(QImage qImage, const QColor &exclusionColor = Qt::white);
|
|
|
|
};
|