You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "lpConfig.h"
|
|
|
|
|
#include <QSettings>
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|