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.
33 lines
782 B
C++
33 lines
782 B
C++
#include "lpConfig.h"
|
|
#include <QSettings>
|
|
lpConfig::lpConfig()
|
|
{
|
|
|
|
}
|
|
|
|
lpConfig::~lpConfig()
|
|
{
|
|
|
|
}
|
|
|
|
void lpConfig::saveConfig()
|
|
{
|
|
QSettings setting("config.ini", QSettings::IniFormat);
|
|
|
|
setting.setValue("urlA", strUrlA);
|
|
setting.setValue("urlB", strUrlB);
|
|
setting.setValue("appPathA", appPathA);
|
|
setting.setValue("appPathB", appPathB);
|
|
setting.setValue("doubleStation", doubleStation);
|
|
}
|
|
|
|
void lpConfig::loadConfig()
|
|
{
|
|
QSettings setting("config.ini", QSettings::IniFormat);
|
|
strUrlA = setting.value("urlA", "ws://localhost:10110").toString();
|
|
strUrlB = setting.value("urlB", "ws://localhost:10111").toString();
|
|
appPathA = setting.value("appPathA").toString();
|
|
appPathB = setting.value("appPathB").toString();
|
|
doubleStation = setting.value("doubleStation",true).toBool();
|
|
}
|