代码拉取完成,页面将自动刷新
同步操作将从 wangnanbo/QT-Monitor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include "myapp.h"
#include "myhelper.h"
QString myApp::AppPath = "";
int myApp::DeskWidth = 1204;//1204
int myApp::DeskHeight = 768;
QString myApp::AppTitle = "智能叉车状态监控软件";
//最后配置信息,画面数
QString myApp::LastConfig = "1";
int myApp::showPlotTimeSpan = 12;
int myApp::showPointNum = 30;
int myApp::imageInMemoryNum = 20;
int myApp::normalDataInMemoryNum = 50;
int myApp::graphicsViewHeigt = 400;
int myApp::graphicsViewWidth = 900;
int myApp::warehouseWidth = 31500;
int myApp::warehouseHeight = 13400;
int myApp::getDataTimeSpan = 20;
int myApp::saveImgTimeSpan = 100;
int myApp::mapRefreshTimeSpan = 0; //0为最快
int myApp::plotRefreshTimeSpan = 0; //0为最快
int myApp::ployNum = 8;
int myApp::dataAutoRemoveDeadLine = 6000; //60s
bool myApp::topShow = false;
bool myApp::connectSysFlag = false;
double myApp::dataCheckMin = 0.0001;
//读取配置文件
void myApp::ReadConfig()
{
QString fileName = myApp::AppPath + "config.txt";
//如果配置文件不存在,则以初始值继续运行
if (!myHelper::FileIsExist(fileName)) {
//对应中文转成正确的编码
myApp::AppTitle = myApp::AppTitle.toLatin1();
return;
}
QSettings *set = new QSettings(fileName, QSettings::IniFormat);
set->beginGroup("AppConfig");
myApp::AppTitle = set->value("AppTitle").toString();
myApp::LastConfig = set->value("LastConfig").toString();
set->endGroup();
}
//写入配置文件
void myApp::WriteConfig()
{
QString fileName = myApp::AppPath + "config.txt";
QSettings *set = new QSettings(fileName, QSettings::IniFormat);
set->beginGroup("AppConfig");
set->setValue("AppTitle", myApp::AppTitle);
set->setValue("LastConfig", myApp::LastConfig);
set->endGroup();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。