2024-09-12 17:31:39 +08:00
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
2024-09-18 10:25:29 +08:00
|
|
|
|
#include <QTextCodec>
|
2024-09-14 11:18:18 +08:00
|
|
|
|
#include <QDebug>
|
2024-09-18 10:25:29 +08:00
|
|
|
|
#include "global.h"
|
2024-09-12 17:31:39 +08:00
|
|
|
|
|
2024-09-18 10:25:29 +08:00
|
|
|
|
|
|
|
|
|
//初始化数据
|
2025-06-11 16:36:43 +08:00
|
|
|
|
QVector<QMap<QString, QString>> g_param[5];
|
2024-09-18 10:25:29 +08:00
|
|
|
|
QMap<QString, bool> namelist;
|
|
|
|
|
QFile file;
|
|
|
|
|
QCompleter *completer;
|
2024-09-18 15:04:38 +08:00
|
|
|
|
QWidget *widget;
|
|
|
|
|
QDateTime beginTime;
|
|
|
|
|
QDateTime endTime;
|
|
|
|
|
QVector<QCustomPlot *> m_PlotView;
|
|
|
|
|
QVector<QString> rule;
|
2025-06-11 16:36:43 +08:00
|
|
|
|
QVector<double> xData[5];
|
|
|
|
|
QVector<double> yData[5];
|
2024-09-18 10:25:29 +08:00
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
|
//设置logo
|
|
|
|
|
QApplication::setWindowIcon(QIcon("logo.ico"));
|
|
|
|
|
//放大窗口
|
2025-06-11 16:36:43 +08:00
|
|
|
|
qputenv("QT_SCALE_FACTOR", "1.0");
|
2024-09-18 10:25:29 +08:00
|
|
|
|
//设置使用UTF8字符集,正确显示中文
|
|
|
|
|
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
|
|
|
|
QTextCodec::setCodecForLocale(codec);
|
|
|
|
|
|
|
|
|
|
//运行程序
|
2024-09-12 17:31:39 +08:00
|
|
|
|
QApplication a(argc, argv);
|
2024-09-18 10:25:29 +08:00
|
|
|
|
/* 获取分辨率
|
|
|
|
|
QDesktopWidget *desktopWidget = QApplication::desktop();
|
|
|
|
|
//获取可用桌面大小
|
|
|
|
|
QRect deskRect = desktopWidget->availableGeometry();
|
|
|
|
|
qDebug() << deskRect.width() << "x" << deskRect.height();
|
|
|
|
|
//获取设备屏幕大小
|
|
|
|
|
QRect screenRect = desktopWidget->screenGeometry();
|
|
|
|
|
qDebug() << screenRect.width() << "x" << screenRect.height();*/
|
|
|
|
|
MainWindow w;
|
|
|
|
|
w.show();
|
2024-09-12 17:31:39 +08:00
|
|
|
|
return a.exec();
|
|
|
|
|
}
|