|
|
|
|
|
#include "lpConfig.h"
|
|
|
|
|
|
#include <QSettings>
|
|
|
|
|
|
/*ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
|
lpConfig::lpConfig()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
lpConfig::~lpConfig()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void lpConfig::saveConfig()
|
|
|
|
|
|
{
|
|
|
|
|
|
QSettings setting("config.ini", QSettings::IniFormat);
|
|
|
|
|
|
|
|
|
|
|
|
setting.setValue("portA", portA);
|
|
|
|
|
|
setting.setValue("portB", portB);
|
|
|
|
|
|
setting.setValue("appPathA", appPathA);
|
|
|
|
|
|
setting.setValue("appPathB", appPathB);
|
|
|
|
|
|
setting.setValue("doubleStation", doubleStation);
|
|
|
|
|
|
setting.setValue("serverPort", plcServerPort);
|
|
|
|
|
|
setting.setValue("trigerFilter", trigerFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void lpConfig::loadConfig()
|
|
|
|
|
|
{
|
|
|
|
|
|
QSettings setting("config.ini", QSettings::IniFormat);
|
|
|
|
|
|
portA = setting.value("portA", 10110).toInt();
|
|
|
|
|
|
portB = setting.value("portB", 10112).toInt();
|
|
|
|
|
|
appPathA = setting.value("appPathA").toString();
|
|
|
|
|
|
appPathB = setting.value("appPathB").toString();
|
|
|
|
|
|
doubleStation = setting.value("doubleStation",true).toBool();
|
|
|
|
|
|
plcServerPort = setting.value("serverPort", 1000).toInt();
|
|
|
|
|
|
trigerFilter = setting.value("trigerFilter", 1000).toInt();
|
|
|
|
|
|
}
|