70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
#include <QApplication>
|
|
#include <QWidget>
|
|
#ifdef _WINDOWS
|
|
#include <QTextCodec>
|
|
#include <Windows.h>
|
|
#endif
|
|
#include <QStyle>
|
|
#include <QWidget>
|
|
#include <QtWidgets>
|
|
#include "Generate_Mock_Data.h"
|
|
#include "base/Graphic.h"
|
|
#include "base/Plot.h"
|
|
#include "component/Button.h"
|
|
#include "component/simple_widget.h"
|
|
#include "plottable/Afterglow.h"
|
|
#include "plottable/Planisphere.h"
|
|
#include "plottable/Planisphere_p.h"
|
|
#include "plottable/Spectrum.h"
|
|
#include "plottable/Spectrum_p.h"
|
|
#include "plottable/Waterfall.h"
|
|
#include "plottable/Water_Fall_p.h"
|
|
#include "DemoGallery/Afterglow_Plot.h"
|
|
#include "DemoGallery/Demo_Gallery.h"
|
|
#include "DemoGallery/PlanispherePlot.h"
|
|
#include "DemoGallery/Spectrum_Plot.h"
|
|
#include "DemoGallery/Waterfall_Plot.h"
|
|
#include "base/SelectColorDialog/Select_Color_Dialog.h"
|
|
class Temp : public QWidget {
|
|
public:
|
|
Temp() {
|
|
setFixedSize(400, 400);
|
|
image.load("D:/wyc/projects/CLionProjects/plantSunCat/mainProjects/YSGraphic/src/img.png");
|
|
}
|
|
QImage image;
|
|
protected:
|
|
void paintEvent(QPaintEvent* event) override {
|
|
QPainter painter(this);
|
|
double w = width();
|
|
double h = height();
|
|
// painter.scale(-1.5, 1);
|
|
// painter.drawImage(QRectF(-100, 100, 100, 100), image);
|
|
painter.scale(1.5, 1);
|
|
painter.drawImage(QRectF(100, 100, 100, 100), image);
|
|
painter.end();
|
|
}
|
|
};
|
|
#ifdef _build_exe
|
|
int main(int argc, char* argv[]) {
|
|
QApplication app(argc, argv);
|
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
|
#ifdef _WINDOWS
|
|
SetConsoleOutputCP (CP_UTF8);
|
|
system ("chcp 65001");
|
|
//setbuf(stdout, 0);
|
|
#endif
|
|
Button btn;
|
|
btn.show();
|
|
// WaveWidget w;
|
|
// w.resize(400, 400);
|
|
// w.show();
|
|
return QApplication::exec();
|
|
}
|
|
int main2(int argc, char* argv[]) {
|
|
QApplication a(argc, argv);
|
|
WaveWidget w;
|
|
w.show();
|
|
return a.exec();
|
|
}
|
|
#endif
|