store some profile settings and also the window position of the profile window

This commit is contained in:
Volker Fischer 2015-01-31 08:14:52 +00:00
parent 88eed0d627
commit 1ed74b44e2

View File

@ -119,6 +119,17 @@ void CSettings::Load()
pClient->ChannelInfo.eCountry = QLocale::system().country();
}
// city
pClient->ChannelInfo.strCity = FromBase64ToString (
GetIniSetting ( IniXMLDocument, "client", "city_base64" ) );
// skill level
if ( GetNumericIniSet ( IniXMLDocument, "client", "skill",
0, 3 /* SL_PROFESSIONAL */, iValue ) )
{
pClient->ChannelInfo.eSkillLevel = static_cast<ESkillLevel> ( iValue );
}
// audio fader
if ( GetNumericIniSet ( IniXMLDocument, "client", "audfad",
AUD_FADER_IN_MIN, AUD_FADER_IN_MAX, iValue ) )
@ -265,6 +276,10 @@ void CSettings::Load()
pClient->vecWindowPosChat = FromBase64ToByteArray (
GetIniSetting ( IniXMLDocument, "client", "winposchat_base64" ) );
// window position of the musician profile window
pClient->vecWindowPosProfile = FromBase64ToByteArray (
GetIniSetting ( IniXMLDocument, "client", "winposprofile_base64" ) );
// window position of the connect window
pClient->vecWindowPosConnect = FromBase64ToByteArray (
GetIniSetting ( IniXMLDocument, "client", "winposcon_base64" ) );
@ -281,6 +296,12 @@ void CSettings::Load()
pClient->bWindowWasShownChat = bValue;
}
// visibility state of the musician profile window
if ( GetFlagIniSet ( IniXMLDocument, "client", "winvisprofile", bValue ) )
{
pClient->bWindowWasShownProfile = bValue;
}
// visibility state of the connect window
if ( GetFlagIniSet ( IniXMLDocument, "client", "winviscon", bValue ) )
{
@ -387,6 +408,14 @@ void CSettings::Save()
SetNumericIniSet ( IniXMLDocument, "client", "country",
static_cast<int> ( pClient->ChannelInfo.eCountry ) );
// city
PutIniSetting ( IniXMLDocument, "client", "city_base64",
ToBase64 ( pClient->ChannelInfo.strCity ) );
// skill level
SetNumericIniSet ( IniXMLDocument, "client", "skill",
static_cast<int> ( pClient->ChannelInfo.eSkillLevel ) );
// audio fader
SetNumericIniSet ( IniXMLDocument, "client", "audfad",
pClient->GetAudioInFader() );
@ -467,6 +496,10 @@ void CSettings::Save()
PutIniSetting ( IniXMLDocument, "client", "winposchat_base64",
ToBase64 ( pClient->vecWindowPosChat ) );
// window position of the musician profile window
PutIniSetting ( IniXMLDocument, "client", "winposprofile_base64",
ToBase64 ( pClient->vecWindowPosProfile ) );
// window position of the connect window
PutIniSetting ( IniXMLDocument, "client", "winposcon_base64",
ToBase64 ( pClient->vecWindowPosConnect ) );
@ -479,6 +512,10 @@ void CSettings::Save()
SetFlagIniSet ( IniXMLDocument, "client", "winvischat",
pClient->bWindowWasShownChat );
// visibility state of the musician profile window
SetFlagIniSet ( IniXMLDocument, "client", "winvisprofile",
pClient->bWindowWasShownProfile );
// visibility state of the connect window
SetFlagIniSet ( IniXMLDocument, "client", "winviscon",
pClient->bWindowWasShownConnect );