#include <llcontrol.h>
Public Member Functions | |
LLControlVariable (const LLString &name, eControlType type, LLSD initial, const LLString &comment, BOOL persist=TRUE) | |
virtual | ~LLControlVariable () |
const LLString & | getName () const |
const LLString & | getComment () const |
eControlType | type () |
BOOL | isType (eControlType tp) |
void | resetToDefault (bool fire_signal=TRUE) |
signal_t * | getSignal () |
bool | isDefault () |
bool | isSaveValueDefault () |
bool | isPersisted () |
void | set (const LLSD &val) |
LLSD | get () const |
LLSD | getDefault () const |
LLSD | getValue () const |
LLSD | getSaveValue () const |
void | setValue (const LLSD &value, bool saved_value=TRUE) |
void | firePropertyChanged () |
BOOL | llsd_compare (const LLSD &a, const LLSD &b) |
Private Types | |
typedef boost::signal< void(const LLSD &)> | signal_t |
Private Attributes | |
LLString | mName |
LLString | mComment |
eControlType | mType |
BOOL | mPersist |
std::vector< LLSD > | mValues |
signal_t | mSignal |
Friends | |
class | LLControlGroup |
Definition at line 86 of file llcontrol.h.
typedef boost::signal<void(const LLSD&)> LLControlVariable::signal_t [private] |
Definition at line 89 of file llcontrol.h.
LLControlVariable::LLControlVariable | ( | const LLString & | name, | |
eControlType | type, | |||
LLSD | initial, | |||
const LLString & | comment, | |||
BOOL | persist = TRUE | |||
) |
LLControlVariable::~LLControlVariable | ( | ) | [virtual] |
Definition at line 111 of file llcontrol.cpp.
const LLString& LLControlVariable::getName | ( | void | ) | const [inline] |
const LLString& LLControlVariable::getComment | ( | ) | const [inline] |
Definition at line 108 of file llcontrol.h.
References mComment.
Referenced by LLControlGroup::saveToFile(), and LLFloaterSettingsDebug::updateControl().
eControlType LLControlVariable::type | ( | ) | [inline] |
Definition at line 110 of file llcontrol.h.
References mType.
Referenced by LLControlGroup::saveToFile(), setControlValueCB(), and LLFloaterSettingsDebug::updateControl().
BOOL LLControlVariable::isType | ( | eControlType | tp | ) | [inline] |
Definition at line 111 of file llcontrol.h.
References mType.
Referenced by LLFeatureManager::applyFeatures(), LLControlGroup::findString(), LLControlGroup::getBOOL(), LLControlGroup::getColor3(), LLControlGroup::getColor4(), LLControlGroup::getColor4U(), LLControlGroup::getF32(), LLControlGroup::getLLSD(), LLControlGroup::getRect(), LLControlGroup::getS32(), LLControlGroup::getString(), LLControlGroup::getU32(), LLControlGroup::getVector3(), LLControlGroup::getVector3d(), LLControlGroup::setBOOL(), LLControlGroup::setColor4(), LLControlGroup::setColor4U(), LLControlGroup::setF32(), LLControlGroup::setLLSD(), LLControlGroup::setRect(), LLControlGroup::setS32(), LLControlGroup::setString(), LLControlGroup::setU32(), LLControlGroup::setVector3(), and LLControlGroup::setVector3d().
void LLControlVariable::resetToDefault | ( | bool | fire_signal = TRUE |
) |
Definition at line 157 of file llcontrol.cpp.
References firePropertyChanged(), and mValues.
Referenced by LLControlGroup::resetToDefaults(), and setValue().
signal_t* LLControlVariable::getSignal | ( | ) | [inline] |
Definition at line 115 of file llcontrol.h.
References mSignal.
Referenced by LLUI::initClass(), LLVoiceVisualizer::LLVoiceVisualizer(), LLMenuItemCheckGL::setCheckedControl(), LLView::setControlName(), LLMenuItemCallGL::setEnabledControl(), settings_setup_listeners(), and LLMenuItemCallGL::setVisibleControl().
bool LLControlVariable::isDefault | ( | ) | [inline] |
bool LLControlVariable::isSaveValueDefault | ( | ) |
Definition at line 165 of file llcontrol.cpp.
References llsd_compare(), and mValues.
Referenced by LLControlGroup::saveToFile().
bool LLControlVariable::isPersisted | ( | ) | [inline] |
Definition at line 119 of file llcontrol.h.
References mPersist.
Referenced by LLControlGroup::loadFromFile(), and LLControlGroup::saveToFile().
void LLControlVariable::set | ( | const LLSD & | val | ) | [inline] |
Definition at line 120 of file llcontrol.h.
References setValue().
Referenced by LLControlGroup::loadFromFileLegacy(), LLControlGroup::setBOOL(), LLControlGroup::setColor4(), LLControlGroup::setColor4U(), LLControlGroup::setF32(), LLControlGroup::setRect(), LLControlGroup::setS32(), LLControlGroup::setString(), LLControlGroup::setU32(), LLControlGroup::setValue(), LLControlGroup::setVector3(), and LLControlGroup::setVector3d().
LLSD LLControlVariable::get | ( | ) | const [inline] |
Definition at line 121 of file llcontrol.h.
References getValue().
Referenced by LLControlGroup::findString(), LLControlGroup::getBOOL(), LLControlGroup::getColor(), LLControlGroup::getColor3(), LLControlGroup::getColor4(), LLControlGroup::getColor4U(), LLControlGroup::getF32(), LLControlGroup::getRect(), LLControlGroup::getS32(), LLControlGroup::getString(), LLControlGroup::getU32(), LLControlGroup::getVector3(), LLControlGroup::getVector3d(), and LLFloaterSettingsDebug::updateControl().
LLSD LLControlVariable::getDefault | ( | ) | const [inline] |
LLSD LLControlVariable::getValue | ( | ) | const [inline] |
Definition at line 123 of file llcontrol.h.
References mValues.
Referenced by get(), LLControlGroup::getLLSD(), LLAppViewer::initConfiguration(), LLMenuItemCheckGL::setCheckedControl(), LLView::setControlName(), LLMenuItemCallGL::setEnabledControl(), setValue(), and LLMenuItemCallGL::setVisibleControl().
LLSD LLControlVariable::getSaveValue | ( | ) | const |
Definition at line 171 of file llcontrol.cpp.
References mValues.
Referenced by LLControlGroup::saveToFile().
void LLControlVariable::setValue | ( | const LLSD & | value, | |
bool | saved_value = TRUE | |||
) |
Definition at line 115 of file llcontrol.cpp.
References FALSE, getValue(), llsd_compare(), mSignal, mValues, and resetToDefault().
Referenced by LLFileEnableCloseAllWindows::handleEvent(), LLFileEnableCloseWindow::handleEvent(), LLFileEnableUpload::handleEvent(), LLFileEnableSaveAs::handleEvent(), LLEditEnableTakeOff::handleEvent(), LLViewCheckHUDAttachments::handleEvent(), LLViewCheckRenderType::handleEvent(), LLViewCheckBeaconEnabled::handleEvent(), LLViewCheckHighlightTransparent::handleEvent(), LLViewCheckShowHoverTips::handleEvent(), LLWorldEnableTeleportHome::handleEvent(), LLWorldEnableSetHomeLocation::handleEvent(), LLWorldEnableCreateLandmark::handleEvent(), LLToolsEnableToolNotPie::handleEvent(), LLViewEnableMouselook::handleEvent(), LLToolsEnableSaveToObjectInventory::handleEvent(), LLToolsEnableSaveToInventory::handleEvent(), LLToolsEnableTakeCopy::handleEvent(), LLEditableSelected::handleEvent(), LLSomethingSelectedNoHUD::handleEvent(), LLSomethingSelected::handleEvent(), LLObjectEnableWear::handleEvent(), LLAttachmentEnableDetach::handleEvent(), LLAttachmentEnableDrop::handleEvent(), LLWorldEnableBuyLand::handleEvent(), LLFloaterVisible::handleEvent(), LLObjectEnableSitOrStand::handleEvent(), LLEnablePayObject::handleEvent(), LLWorldCheckAlwaysRun::handleEvent(), LLEditEnableRedo::handleEvent(), LLEditEnableUndo::handleEvent(), LLEditEnableSelectAll::handleEvent(), LLEditEnableDeselect::handleEvent(), LLViewEnableLastChatter::handleEvent(), LLObjectEnableDelete::handleEvent(), LLEditEnableDelete::handleEvent(), LLEditEnablePaste::handleEvent(), LLEditEnableCopy::handleEvent(), LLEditEnableCut::handleEvent(), LLToolsEnableUnlink::handleEvent(), LLToolsEnableLink::handleEvent(), LLToolsEnableBuyOrTake::handleEvent(), LLObjectEnableReturn::handleEvent(), LLEditEnableDuplicate::handleEvent(), LLWorldEnableFly::handleEvent(), LLEditEnableCustomizeAvatar::handleEvent(), LLAvatarEnableAddFriend::handleEvent(), LLSelfEnableStandUp::handleEvent(), LLObjectEnableBuy::handleEvent(), LLAvatarEnableFreezeEject::handleEvent(), LLAvatarEnableDebug::handleEvent(), LLAvatarVisibleDebug::handleEvent(), LLObjectEnableMute::handleEvent(), LLSelfEnableRemoveAllAttachments::handleEvent(), LLEnableEdit::handleEvent(), LLLandEnableBuyPass::handleEvent(), LLViewCheckJoystickFlycam::handleEvent(), LLViewCheckBuildMode::handleEvent(), LLObjectEnableOpen::handleEvent(), LLObjectEnableTouch::handleEvent(), LLObjectEnableReportAbuse::handleEvent(), LLSetSortBy::handleEvent(), LLAppViewer::initConfiguration(), LLAppViewerWin32::initParseCommandLine(), LLAppViewerMacOSX::initParseCommandLine(), LLAppViewerLinux::initParseCommandLine(), LLControlGroup::loadFromFile(), LLInventoryViewFinder::onClose(), set(), and setControlValueCB().
void LLControlVariable::firePropertyChanged | ( | ) | [inline] |
Definition at line 126 of file llcontrol.h.
References mSignal, and mValues.
Referenced by LLViewerWindow::LLViewerWindow(), and resetToDefault().
Definition at line 61 of file llcontrol.cpp.
References LLSD::asBoolean(), LLSD::asInteger(), LLSD::asReal(), LLSD::asString(), FALSE, mType, TYPE_BOOLEAN, TYPE_COL3, TYPE_COL4, TYPE_COL4U, TYPE_F32, TYPE_RECT, TYPE_S32, TYPE_STRING, TYPE_U32, TYPE_VEC3, and TYPE_VEC3D.
Referenced by isSaveValueDefault(), and setValue().
friend class LLControlGroup [friend] |
Definition at line 88 of file llcontrol.h.
LLString LLControlVariable::mName [private] |
LLString LLControlVariable::mComment [private] |
eControlType LLControlVariable::mType [private] |
Definition at line 94 of file llcontrol.h.
Referenced by LLControlGroup::getColor(), isType(), llsd_compare(), LLControlGroup::loadFromFileLegacy(), and type().
BOOL LLControlVariable::mPersist [private] |
std::vector<LLSD> LLControlVariable::mValues [private] |
Definition at line 96 of file llcontrol.h.
Referenced by firePropertyChanged(), getDefault(), getSaveValue(), getValue(), isDefault(), isSaveValueDefault(), LLControlVariable(), resetToDefault(), and setValue().
signal_t LLControlVariable::mSignal [private] |
Definition at line 98 of file llcontrol.h.
Referenced by firePropertyChanged(), getSignal(), and setValue().