Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 750 → Rev 749

/QMK-Groundstation/trunk/QMK-Settings/Classes/cSettings.cpp
40,8 → 40,18
GUI.isMax = Setting.value("IsMax",false).toBool();
GUI.Size = Setting.value("Size", QSize(500, 350)).toSize();
GUI.Point = Setting.value("Point",QPoint(1,1)).toPoint();
GUI.Toolbar = Setting.value("Toolbar",true).toBool();
Setting.endGroup();
 
Setting.beginGroup("SERVER");
SERVER.Password = Setting.value("Password", QString("")).toString();
SERVER.IP_MAX = Setting.value("IP_MAX", 1).toInt();
SERVER.IP_ID = Setting.value("IP_ID", 0).toInt();
 
for (int z = 0; z < SERVER.IP_MAX; z++)
{
SERVER.IP[z] = Setting.value("IP_" + QString("%1").arg(z), QString("127.0.0.1:64400")).toString();
}
Setting.endGroup();
}
 
void cSettings::write_Settings()
56,6 → 66,16
Setting.setValue("IsMax", GUI.isMax);
Setting.setValue("Size", GUI.Size);
Setting.setValue("Point", GUI.Point);
Setting.setValue("Toolbar", GUI.Toolbar);
Setting.endGroup();
 
Setting.beginGroup("SERVER");
Setting.setValue("Password", SERVER.Password);
Setting.setValue("IP_MAX", SERVER.IP_MAX);
Setting.setValue("IP_ID", SERVER.IP_ID);
 
for (int z = 0; z < SERVER.IP_MAX; z++)
{
Setting.setValue("IP_" + QString("%1").arg(z), SERVER.IP[z]);
}
Setting.endGroup();
}
/QMK-Groundstation/trunk/QMK-Settings/Classes/cSettings.h
30,9 → 30,16
bool isMax;
QSize Size;
QPoint Point;
bool Toolbar;
};
 
struct set_SERVER
{
int IP_MAX;
int IP_ID;
QString IP[10];
QString Password;
};
 
class cSettings
{
public:
43,6 → 50,7
int Settings_ID;
 
set_GUI GUI;
set_SERVER SERVER;
};
 
#endif // CSETTINGS_H