PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/newview/llsavedsettingsglue.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 59 lines | 24 code | 9 blank | 26 comment | 0 complexity | f5926ac1c61b7dbd36929ecd2817867b MD5 | raw file
 1/** 
 2 * @file llsavedsettingsglue.cpp
 3 * @author James Cook
 4 * @brief LLSavedSettingsGlue class implementation
 5 *
 6 * $LicenseInfo:firstyear=2006&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28#include "llviewerprecompiledheaders.h"
29
30#include "llsavedsettingsglue.h"
31
32#include "lluictrl.h"
33
34#include "llviewercontrol.h"
35
36void LLSavedSettingsGlue::setBOOL(LLUICtrl* ctrl, const std::string& name)
37{
38	gSavedSettings.setBOOL(name, ctrl->getValue().asBoolean());
39}
40
41void LLSavedSettingsGlue::setS32(LLUICtrl* ctrl, const std::string& name)
42{
43	gSavedSettings.setS32(name, ctrl->getValue().asInteger());
44}
45
46void LLSavedSettingsGlue::setF32(LLUICtrl* ctrl, const std::string& name)
47{
48	gSavedSettings.setF32(name, (F32)ctrl->getValue().asReal());
49}
50
51void LLSavedSettingsGlue::setU32(LLUICtrl* ctrl, const std::string& name)
52{
53	gSavedSettings.setU32(name, (U32)ctrl->getValue().asInteger());
54}
55
56void LLSavedSettingsGlue::setString(LLUICtrl* ctrl, const std::string& name)
57{
58	gSavedSettings.setString(name, ctrl->getValue().asString());
59}