#include #include #ifdef _WINDOWS #include #include #endif #include #include #include #include "GenerateMockData.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/WaterFall_p.h" #include "DemoGallery/AfterglowPlot.h" #include "DemoGallery/DemoGallery.h" #include "DemoGallery/PlanispherePlot.h" #include "DemoGallery/SpectrumPlot.h" #include "DemoGallery/WaterFallPlot.h" #include "base/SelectColorDialog/SelectColorDialog.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