代码拉取完成,页面将自动刷新
同步操作将从 sj0830/qt_project 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include "myapp.h"
#include "myhelper.h"
#pragma execution_character_set("utf-8")
QString myApp::AppPath = "";
int myApp::DeskWidth = 1024;
int myApp::DeskHeight = 768;
QString myApp::AppTitle = "视频监管平台";
QString myApp::NVRType = "深广;宝学;敏达;泰杰;汇迪;银江;海康;大华;宇视;皓维;银海";
QString myApp::IPCType = "泰杰;敏达;银江;海康;大华;宇视";
QString myApp::AppStyle = ":/image/silvery.css";
int myApp::VideoDelayTime = 300;
bool myApp::UseVideoOffLineCheck = true;
int myApp::VideoOffLineCheckInterval = 30;
int myApp::RtspType = 1;
bool myApp::AutoRun = false;
bool myApp::AutoPoll = false;
int myApp::PollType = 1;
int myApp::PollInterval = 30;
int myApp::PollSleep = 0;
// 默认16个通道全部显示
QString myApp::VideoType = "16";
// 16个通道对应rtsp地址,方便自启动后自动加载
QString myApp::RtspAddr16 = "|||||||||||||||";
// 最后配置信息,画面数
QString myApp::LastConfig = "1";
// 读取配置文件
void myApp::ReadConfig()
{
QString fileName = myApp::AppPath + "config.txt";
// 如果配置文件不存在,则以初始值继续运行
if (!myHelper::FileIsExist(fileName))
{
// 对应中文转成正确的编码
myApp::AppTitle = myApp::AppTitle.toLatin1();
myApp::NVRType = myApp::NVRType.toLatin1();
myApp::IPCType = myApp::IPCType.toLatin1();
return;
}
QSettings *set = new QSettings(fileName, QSettings::IniFormat);
set->beginGroup("AppConfig");
myApp::AppTitle = set->value("AppTitle").toString();
myApp::NVRType = set->value("NVRType").toString();
myApp::IPCType = set->value("IPCType").toString();
myApp::AppStyle = set->value("AppStyle").toString();
myApp::VideoDelayTime = set->value("VideoDelayTime").toInt();
myApp::UseVideoOffLineCheck = set->value("UseVideoOffLineCheck").toBool();
myApp::VideoOffLineCheckInterval = set->value("VideoOffLineCheckInterval").toInt();
myApp::RtspType = set->value("RtspType").toInt();
myApp::AutoRun = set->value("AutoRun").toBool();
myApp::AutoPoll = set->value("AutoPoll").toBool();
myApp::PollType = set->value("PollType").toInt();
myApp::PollInterval = set->value("PollInterval").toInt();
myApp::PollSleep = set->value("PollSleep").toInt();
myApp::VideoType = set->value("VideoType").toString();
myApp::RtspAddr16 = set->value("RtspAddr16").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("NVRType", myApp::NVRType);
set->setValue("IPCType", myApp::IPCType);
set->setValue("AppStyle", myApp::AppStyle);
set->setValue("VideoDelayTime", myApp::VideoDelayTime);
set->setValue("UseVideoOffLineCheck", myApp::UseVideoOffLineCheck);
set->setValue("VideoOffLineCheckInterval", myApp::VideoOffLineCheckInterval);
set->setValue("RtspType", myApp::RtspType);
set->setValue("AutoRun", myApp::AutoRun);
set->setValue("AutoPoll", myApp::AutoPoll);
set->setValue("PollType", myApp::PollType);
set->setValue("PollInterval", myApp::PollInterval);
set->setValue("PollSleep", myApp::PollSleep);
set->setValue("VideoType", myApp::VideoType);
set->setValue("RtspAddr16", myApp::RtspAddr16);
set->setValue("LastConfig", myApp::LastConfig);
set->endGroup();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。